aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-03-27 20:53:11 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-03-27 20:53:11 +0200
commit6f0c39e2de400685b7baf8340b9e132f2659365a (patch)
treeb036c6ebf65ff4cb7f5649fc48a0b7201370bddd /server/middlewares/validators
parent28974889281523eec5b00dd5596c67d99c5167e5 (diff)
downloadPeerTube-6f0c39e2de400685b7baf8340b9e132f2659365a.tar.gz
PeerTube-6f0c39e2de400685b7baf8340b9e132f2659365a.tar.zst
PeerTube-6f0c39e2de400685b7baf8340b9e132f2659365a.zip
Server: add licence video 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 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