From 31b59b477459d4f26ed8ef089a0e5553fb6a332b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 28 Mar 2017 21:19:46 +0200 Subject: Server: add nsfw attribute --- server/middlewares/validators/videos.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'server/middlewares/validators') diff --git a/server/middlewares/validators/videos.js b/server/middlewares/validators/videos.js index 6cc0c2565..095fc382b 100644 --- a/server/middlewares/validators/videos.js +++ b/server/middlewares/validators/videos.js @@ -23,6 +23,7 @@ function videosAdd (req, res, next) { 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('nsfw', 'Should have a valid NSFW attribute').isVideoNSFWValid() req.checkBody('description', 'Should have a valid description').isVideoDescriptionValid() req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid() @@ -51,6 +52,7 @@ function videosUpdate (req, res, next) { 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('nsfw', 'Should have a valid NSFW attribute').optional().isVideoNSFWValid() req.checkBody('description', 'Should have a valid description').optional().isVideoDescriptionValid() req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid() -- cgit v1.2.3