diff options
Diffstat (limited to 'controllers/api/v1/remoteVideos.js')
-rw-r--r-- | controllers/api/v1/remoteVideos.js | 11 |
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 | ||