From 6f0c39e2de400685b7baf8340b9e132f2659365a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 27 Mar 2017 20:53:11 +0200 Subject: Server: add licence video attribute --- server/middlewares/validators/videos.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'server/middlewares') 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) { req.checkBody('videofile', 'Should have a valid file').isVideoFile(req.files) req.checkBody('name', 'Should have a valid name').isVideoNameValid() req.checkBody('category', 'Should have a valid category').isVideoCategoryValid() + req.checkBody('licence', 'Should have a valid licence').isVideoLicenceValid() req.checkBody('description', 'Should have a valid description').isVideoDescriptionValid() req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid() @@ -49,6 +50,7 @@ function videosUpdate (req, res, next) { req.checkParams('id', 'Should have a valid id').notEmpty().isUUID(4) req.checkBody('name', 'Should have a valid name').optional().isVideoNameValid() req.checkBody('category', 'Should have a valid category').optional().isVideoCategoryValid() + req.checkBody('licence', 'Should have a valid licence').optional().isVideoLicenceValid() req.checkBody('description', 'Should have a valid description').optional().isVideoDescriptionValid() req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid() -- cgit v1.2.3