aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/api/v1/remoteVideos.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2015-11-07 18:40:13 +0100
committerChocobozzz <florian.bigard@gmail.com>2015-11-07 18:40:13 +0100
commitb60035d8e86b712e586550f762c26caae353dc0e (patch)
treea6dc088e5e48f93eb129e40672a7bea0d230a97c /routes/api/v1/remoteVideos.js
parente85782f7da44267e11714a63567feb7e0127126e (diff)
downloadPeerTube-b60035d8e86b712e586550f762c26caae353dc0e.tar.gz
PeerTube-b60035d8e86b712e586550f762c26caae353dc0e.tar.zst
PeerTube-b60035d8e86b712e586550f762c26caae353dc0e.zip
Middleware refractoring
Diffstat (limited to 'routes/api/v1/remoteVideos.js')
-rw-r--r--routes/api/v1/remoteVideos.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/routes/api/v1/remoteVideos.js b/routes/api/v1/remoteVideos.js
index 23bdcbe24..10793b2b4 100644
--- a/routes/api/v1/remoteVideos.js
+++ b/routes/api/v1/remoteVideos.js
@@ -4,7 +4,8 @@
4 var express = require('express') 4 var express = require('express')
5 var router = express.Router() 5 var router = express.Router()
6 var middleware = require('../../../middlewares') 6 var middleware = require('../../../middlewares')
7 var requestValidator = require('../../../middlewares/reqValidators').remote 7 var miscMiddleware = middleware.misc
8 var reqValidator = middleware.reqValidators.remote
8 var videos = require('../../../src/videos') 9 var videos = require('../../../src/videos')
9 10
10 function addRemoteVideos (req, res, next) { 11 function addRemoteVideos (req, res, next) {
@@ -23,8 +24,8 @@
23 }) 24 })
24 } 25 }
25 26
26 router.post('/add', requestValidator.secureRequest, middleware.decryptBody, requestValidator.remoteVideosAdd, middleware.cache(false), addRemoteVideos) 27 router.post('/add', reqValidator.secureRequest, miscMiddleware.decryptBody, reqValidator.remoteVideosAdd, miscMiddleware.cache(false), addRemoteVideos)
27 router.post('/remove', requestValidator.secureRequest, middleware.decryptBody, requestValidator.remoteVideosRemove, middleware.cache(false), removeRemoteVideo) 28 router.post('/remove', reqValidator.secureRequest, miscMiddleware.decryptBody, reqValidator.remoteVideosRemove, miscMiddleware.cache(false), removeRemoteVideo)
28 29
29 module.exports = router 30 module.exports = router
30})() 31})()