aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/videos.js')
-rw-r--r--server/middlewares/validators/videos.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/middlewares/validators/videos.js b/server/middlewares/validators/videos.js
index 7dc79c56f..37cc13372 100644
--- a/server/middlewares/validators/videos.js
+++ b/server/middlewares/validators/videos.js
@@ -21,6 +21,7 @@ const validatorsVideos = {
21function videosAdd (req, res, next) { 21function videosAdd (req, res, next) {
22 req.checkBody('videofile', 'Should have a valid file').isVideoFile(req.files) 22 req.checkBody('videofile', 'Should have a valid file').isVideoFile(req.files)
23 req.checkBody('name', 'Should have a valid name').isVideoNameValid() 23 req.checkBody('name', 'Should have a valid name').isVideoNameValid()
24 req.checkBody('category', 'Should have a valid category').isVideoCategoryValid()
24 req.checkBody('description', 'Should have a valid description').isVideoDescriptionValid() 25 req.checkBody('description', 'Should have a valid description').isVideoDescriptionValid()
25 req.checkBody('tags', 'Should have correct tags').isVideoTagsValid() 26 req.checkBody('tags', 'Should have correct tags').isVideoTagsValid()
26 27
@@ -47,6 +48,7 @@ function videosAdd (req, res, next) {
47function videosUpdate (req, res, next) { 48function videosUpdate (req, res, next) {
48 req.checkParams('id', 'Should have a valid id').notEmpty().isUUID(4) 49 req.checkParams('id', 'Should have a valid id').notEmpty().isUUID(4)
49 req.checkBody('name', 'Should have a valid name').optional().isVideoNameValid() 50 req.checkBody('name', 'Should have a valid name').optional().isVideoNameValid()
51 req.checkBody('category', 'Should have a valid category').optional().isVideoCategoryValid()
50 req.checkBody('description', 'Should have a valid description').optional().isVideoDescriptionValid() 52 req.checkBody('description', 'Should have a valid description').optional().isVideoDescriptionValid()
51 req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid() 53 req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid()
52 54