diff options
Diffstat (limited to 'server/middlewares/validators/videos.js')
-rw-r--r-- | server/middlewares/validators/videos.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/middlewares/validators/videos.js b/server/middlewares/validators/videos.js index cf3874a97..6cc0c2565 100644 --- a/server/middlewares/validators/videos.js +++ b/server/middlewares/validators/videos.js | |||
@@ -22,6 +22,7 @@ function 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('category', 'Should have a valid category').isVideoCategoryValid() |
25 | req.checkBody('licence', 'Should have a valid licence').isVideoLicenceValid() | ||
25 | req.checkBody('description', 'Should have a valid description').isVideoDescriptionValid() | 26 | req.checkBody('description', 'Should have a valid description').isVideoDescriptionValid() |
26 | req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid() | 27 | req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid() |
27 | 28 | ||
@@ -49,6 +50,7 @@ function videosUpdate (req, res, next) { | |||
49 | req.checkParams('id', 'Should have a valid id').notEmpty().isUUID(4) | 50 | req.checkParams('id', 'Should have a valid id').notEmpty().isUUID(4) |
50 | req.checkBody('name', 'Should have a valid name').optional().isVideoNameValid() | 51 | req.checkBody('name', 'Should have a valid name').optional().isVideoNameValid() |
51 | req.checkBody('category', 'Should have a valid category').optional().isVideoCategoryValid() | 52 | req.checkBody('category', 'Should have a valid category').optional().isVideoCategoryValid() |
53 | req.checkBody('licence', 'Should have a valid licence').optional().isVideoLicenceValid() | ||
52 | req.checkBody('description', 'Should have a valid description').optional().isVideoDescriptionValid() | 54 | req.checkBody('description', 'Should have a valid description').optional().isVideoDescriptionValid() |
53 | req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid() | 55 | req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid() |
54 | 56 | ||