aboutsummaryrefslogtreecommitdiffhomepage
path: root/controllers/api/v1/remoteVideos.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-02-04 21:16:27 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-02-04 21:23:06 +0100
commita5fa04b0cce851f680a45055f57ed2c3d22f1c82 (patch)
tree0749c4d6889d7cf250110f9ff59a8cd22ee8a480 /controllers/api/v1/remoteVideos.js
parentc173e56520b0fe4206b9ea8049b6add40bfeabcd (diff)
downloadPeerTube-a5fa04b0cce851f680a45055f57ed2c3d22f1c82.tar.gz
PeerTube-a5fa04b0cce851f680a45055f57ed2c3d22f1c82.tar.zst
PeerTube-a5fa04b0cce851f680a45055f57ed2c3d22f1c82.zip
Split misc middleware
Diffstat (limited to 'controllers/api/v1/remoteVideos.js')
-rw-r--r--controllers/api/v1/remoteVideos.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/controllers/api/v1/remoteVideos.js b/controllers/api/v1/remoteVideos.js
index d72db9836..58bb5f3cb 100644
--- a/controllers/api/v1/remoteVideos.js
+++ b/controllers/api/v1/remoteVideos.js
@@ -5,7 +5,8 @@
5 var pluck = require('lodash-node/compat/collection/pluck') 5 var pluck = require('lodash-node/compat/collection/pluck')
6 6
7 var middleware = require('../../../middlewares') 7 var middleware = require('../../../middlewares')
8 var miscMiddleware = middleware.misc 8 var secureMiddleware = middleware.secure
9 var cacheMiddleware = middleware.cache
9 var reqValidator = middleware.reqValidators.remote 10 var reqValidator = middleware.reqValidators.remote
10 var videos = require('../../../models/videos') 11 var videos = require('../../../models/videos')
11 12
@@ -13,17 +14,17 @@
13 14
14 router.post('/add', 15 router.post('/add',
15 reqValidator.secureRequest, 16 reqValidator.secureRequest,
16 miscMiddleware.decryptBody, 17 secureMiddleware.decryptBody,
17 reqValidator.remoteVideosAdd, 18 reqValidator.remoteVideosAdd,
18 miscMiddleware.cache(false), 19 cacheMiddleware.cache(false),
19 addRemoteVideos 20 addRemoteVideos
20 ) 21 )
21 22
22 router.post('/remove', 23 router.post('/remove',
23 reqValidator.secureRequest, 24 reqValidator.secureRequest,
24 miscMiddleware.decryptBody, 25 secureMiddleware.decryptBody,
25 reqValidator.remoteVideosRemove, 26 reqValidator.remoteVideosRemove,
26 miscMiddleware.cache(false), 27 cacheMiddleware.cache(false),
27 removeRemoteVideo 28 removeRemoteVideo
28 ) 29 )
29 30