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.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/routes/api/v1/videos.js b/routes/api/v1/videos.js
index 246620ac6..06b248244 100644
--- a/routes/api/v1/videos.js
+++ b/routes/api/v1/videos.js
@@ -4,6 +4,7 @@
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 videos = require('../../../src/videos') 8 var videos = require('../../../src/videos')
8 9
9 function listVideos (req, res, next) { 10 function listVideos (req, res, next) {
@@ -52,10 +53,10 @@
52 } 53 }
53 54
54 router.get('/', middleware.cache(false), listVideos) 55 router.get('/', middleware.cache(false), listVideos)
55 router.post('/', middleware.cache(false), addVideos) 56 router.post('/', reqValidator.videosAdd, middleware.cache(false), addVideos)
56 router.get('/search/:name', middleware.cache(false), searchVideos) 57 router.get('/search/:name', reqValidator.videosSearch, middleware.cache(false), searchVideos)
57 router.get('/:id', middleware.cache(false), getVideos) 58 router.get('/:id', reqValidator.videosGet, middleware.cache(false), getVideos)
58 router.delete('/:id', middleware.cache(false), removeVideo) 59 router.delete('/:id', reqValidator.videosRemove, middleware.cache(false), removeVideo)
59 60
60 module.exports = router 61 module.exports = router
61})() 62})()