diff options
Diffstat (limited to 'server/controllers/api/v1/videos.js')
-rw-r--r-- | server/controllers/api/v1/videos.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/server/controllers/api/v1/videos.js b/server/controllers/api/v1/videos.js index ab115bc30..a37e9278e 100644 --- a/server/controllers/api/v1/videos.js +++ b/server/controllers/api/v1/videos.js | |||
@@ -11,10 +11,10 @@ const friends = require('../../../lib/friends') | |||
11 | const middlewares = require('../../../middlewares') | 11 | const middlewares = require('../../../middlewares') |
12 | const oAuth = middlewares.oauth | 12 | const oAuth = middlewares.oauth |
13 | const pagination = middlewares.pagination | 13 | const pagination = middlewares.pagination |
14 | const reqValidator = middlewares.reqValidators | 14 | const validators = middlewares.validators |
15 | const reqValidatorPagination = reqValidator.pagination | 15 | const validatorsPagination = validators.pagination |
16 | const reqValidatorSort = reqValidator.sort | 16 | const validatorsSort = validators.sort |
17 | const reqValidatorVideos = reqValidator.videos | 17 | const validatorsVideos = validators.videos |
18 | const search = middlewares.search | 18 | const search = middlewares.search |
19 | const sort = middlewares.sort | 19 | const sort = middlewares.sort |
20 | const utils = require('../../../helpers/utils') | 20 | const utils = require('../../../helpers/utils') |
@@ -44,8 +44,8 @@ const storage = multer.diskStorage({ | |||
44 | const reqFiles = multer({ storage: storage }).fields([{ name: 'videofile', maxCount: 1 }]) | 44 | const reqFiles = multer({ storage: storage }).fields([{ name: 'videofile', maxCount: 1 }]) |
45 | 45 | ||
46 | router.get('/', | 46 | router.get('/', |
47 | reqValidatorPagination.pagination, | 47 | validatorsPagination.pagination, |
48 | reqValidatorSort.videosSort, | 48 | validatorsSort.videosSort, |
49 | sort.setVideosSort, | 49 | sort.setVideosSort, |
50 | pagination.setPagination, | 50 | pagination.setPagination, |
51 | listVideos | 51 | listVideos |
@@ -53,22 +53,22 @@ router.get('/', | |||
53 | router.post('/', | 53 | router.post('/', |
54 | oAuth.authenticate, | 54 | oAuth.authenticate, |
55 | reqFiles, | 55 | reqFiles, |
56 | reqValidatorVideos.videosAdd, | 56 | validatorsVideos.videosAdd, |
57 | addVideo | 57 | addVideo |
58 | ) | 58 | ) |
59 | router.get('/:id', | 59 | router.get('/:id', |
60 | reqValidatorVideos.videosGet, | 60 | validatorsVideos.videosGet, |
61 | getVideo | 61 | getVideo |
62 | ) | 62 | ) |
63 | router.delete('/:id', | 63 | router.delete('/:id', |
64 | oAuth.authenticate, | 64 | oAuth.authenticate, |
65 | reqValidatorVideos.videosRemove, | 65 | validatorsVideos.videosRemove, |
66 | removeVideo | 66 | removeVideo |
67 | ) | 67 | ) |
68 | router.get('/search/:value', | 68 | router.get('/search/:value', |
69 | reqValidatorVideos.videosSearch, | 69 | validatorsVideos.videosSearch, |
70 | reqValidatorPagination.pagination, | 70 | validatorsPagination.pagination, |
71 | reqValidatorSort.videosSort, | 71 | validatorsSort.videosSort, |
72 | sort.setVideosSort, | 72 | sort.setVideosSort, |
73 | pagination.setPagination, | 73 | pagination.setPagination, |
74 | search.setVideosSearch, | 74 | search.setVideosSearch, |