aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-03-28 21:19:46 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-03-28 21:19:46 +0200
commit31b59b477459d4f26ed8ef089a0e5553fb6a332b (patch)
tree70de15dc172045d01ad45718f55c22d5ca43b354 /server/middlewares/validators
parentd07137b90b2b2b0c1e93a6f0e7bf8719b133027c (diff)
downloadPeerTube-31b59b477459d4f26ed8ef089a0e5553fb6a332b.tar.gz
PeerTube-31b59b477459d4f26ed8ef089a0e5553fb6a332b.tar.zst
PeerTube-31b59b477459d4f26ed8ef089a0e5553fb6a332b.zip
Server: add nsfw attribute
Diffstat (limited to 'server/middlewares/validators')
-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 6cc0c2565..095fc382b 100644
--- a/server/middlewares/validators/videos.js
+++ b/server/middlewares/validators/videos.js
@@ -23,6 +23,7 @@ function videosAdd (req, res, next) {
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('licence', 'Should have a valid licence').isVideoLicenceValid()
26 req.checkBody('nsfw', 'Should have a valid NSFW attribute').isVideoNSFWValid()
26 req.checkBody('description', 'Should have a valid description').isVideoDescriptionValid() 27 req.checkBody('description', 'Should have a valid description').isVideoDescriptionValid()
27 req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid() 28 req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid()
28 29
@@ -51,6 +52,7 @@ function videosUpdate (req, res, next) {
51 req.checkBody('name', 'Should have a valid name').optional().isVideoNameValid() 52 req.checkBody('name', 'Should have a valid name').optional().isVideoNameValid()
52 req.checkBody('category', 'Should have a valid category').optional().isVideoCategoryValid() 53 req.checkBody('category', 'Should have a valid category').optional().isVideoCategoryValid()
53 req.checkBody('licence', 'Should have a valid licence').optional().isVideoLicenceValid() 54 req.checkBody('licence', 'Should have a valid licence').optional().isVideoLicenceValid()
55 req.checkBody('nsfw', 'Should have a valid NSFW attribute').optional().isVideoNSFWValid()
54 req.checkBody('description', 'Should have a valid description').optional().isVideoDescriptionValid() 56 req.checkBody('description', 'Should have a valid description').optional().isVideoDescriptionValid()
55 req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid() 57 req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid()
56 58