aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/api/v1/videos.js
diff options
context:
space:
mode:
Diffstat (limited to 'routes/api/v1/videos.js')
-rw-r--r--routes/api/v1/videos.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/routes/api/v1/videos.js b/routes/api/v1/videos.js
index 06b248244..33c565437 100644
--- a/routes/api/v1/videos.js
+++ b/routes/api/v1/videos.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 reqValidator = require('../../../middlewares/reqValidators').videos 7 var miscMiddleware = middleware.misc
8 var reqValidator = middleware.reqValidators.videos
8 var videos = require('../../../src/videos') 9 var videos = require('../../../src/videos')
9 10
10 function listVideos (req, res, next) { 11 function listVideos (req, res, next) {
@@ -52,11 +53,11 @@
52 }) 53 })
53 } 54 }
54 55
55 router.get('/', middleware.cache(false), listVideos) 56 router.get('/', miscMiddleware.cache(false), listVideos)
56 router.post('/', reqValidator.videosAdd, middleware.cache(false), addVideos) 57 router.post('/', reqValidator.videosAdd, miscMiddleware.cache(false), addVideos)
57 router.get('/search/:name', reqValidator.videosSearch, middleware.cache(false), searchVideos) 58 router.get('/search/:name', reqValidator.videosSearch, miscMiddleware.cache(false), searchVideos)
58 router.get('/:id', reqValidator.videosGet, middleware.cache(false), getVideos) 59 router.get('/:id', reqValidator.videosGet, miscMiddleware.cache(false), getVideos)
59 router.delete('/:id', reqValidator.videosRemove, middleware.cache(false), removeVideo) 60 router.delete('/:id', reqValidator.videosRemove, miscMiddleware.cache(false), removeVideo)
60 61
61 module.exports = router 62 module.exports = router
62})() 63})()