aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-04-07 12:13:37 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-04-07 12:13:37 +0200
commit3092476e64d09b449b4ad4f5198024afec1b22ca (patch)
treef2d2bd33578e122188cd2297f60e12813bffdbb7 /server/middlewares/validators
parent023553a2bde74c5765b5ea679fc04128c27f18a0 (diff)
downloadPeerTube-3092476e64d09b449b4ad4f5198024afec1b22ca.tar.gz
PeerTube-3092476e64d09b449b4ad4f5198024afec1b22ca.tar.zst
PeerTube-3092476e64d09b449b4ad4f5198024afec1b22ca.zip
Server: add video language 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 095fc382b..c07825e50 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('language', 'Should have a valid language').optional().isVideoLanguageValid()
26 req.checkBody('nsfw', 'Should have a valid NSFW attribute').isVideoNSFWValid() 27 req.checkBody('nsfw', 'Should have a valid NSFW attribute').isVideoNSFWValid()
27 req.checkBody('description', 'Should have a valid description').isVideoDescriptionValid() 28 req.checkBody('description', 'Should have a valid description').isVideoDescriptionValid()
28 req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid() 29 req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid()
@@ -52,6 +53,7 @@ function videosUpdate (req, res, next) {
52 req.checkBody('name', 'Should have a valid name').optional().isVideoNameValid() 53 req.checkBody('name', 'Should have a valid name').optional().isVideoNameValid()
53 req.checkBody('category', 'Should have a valid category').optional().isVideoCategoryValid() 54 req.checkBody('category', 'Should have a valid category').optional().isVideoCategoryValid()
54 req.checkBody('licence', 'Should have a valid licence').optional().isVideoLicenceValid() 55 req.checkBody('licence', 'Should have a valid licence').optional().isVideoLicenceValid()
56 req.checkBody('language', 'Should have a valid language').optional().isVideoLanguageValid()
55 req.checkBody('nsfw', 'Should have a valid NSFW attribute').optional().isVideoNSFWValid() 57 req.checkBody('nsfw', 'Should have a valid NSFW attribute').optional().isVideoNSFWValid()
56 req.checkBody('description', 'Should have a valid description').optional().isVideoDescriptionValid() 58 req.checkBody('description', 'Should have a valid description').optional().isVideoDescriptionValid()
57 req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid() 59 req.checkBody('tags', 'Should have correct tags').optional().isVideoTagsValid()