aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-02-10 11:27:14 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-02-10 11:27:14 +0100
commitf6f7dfee01e8b7ddf62d2549b8f381d0b12b590e (patch)
treedf99579a701d40b02e495c76337a6d266f60dcc6 /server/middlewares/validators/videos.js
parentc70e0710b39b45e1b8b2d043e3d94f59df16b8a8 (diff)
downloadPeerTube-f6f7dfee01e8b7ddf62d2549b8f381d0b12b590e.tar.gz
PeerTube-f6f7dfee01e8b7ddf62d2549b8f381d0b12b590e.tar.zst
PeerTube-f6f7dfee01e8b7ddf62d2549b8f381d0b12b590e.zip
Server: update express-validator
Diffstat (limited to 'server/middlewares/validators/videos.js')
-rw-r--r--server/middlewares/validators/videos.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/server/middlewares/validators/videos.js b/server/middlewares/validators/videos.js
index 4fe6dcd8b..5c3f3ecf3 100644
--- a/server/middlewares/validators/videos.js
+++ b/server/middlewares/validators/videos.js
@@ -17,9 +17,7 @@ const validatorsVideos = {
17} 17}
18 18
19function videosAdd (req, res, next) { 19function videosAdd (req, res, next) {
20 req.checkFiles('videofile[0].originalname', 'Should have an input video').notEmpty() 20 req.checkBody('videofile', 'Should have a valid file').isVideoFile(req.files)
21 // TODO: move to constants and function
22 req.checkFiles('videofile[0].mimetype', 'Should have a correct mime type').matches(/video\/(webm)|(mp4)|(ogg)/i)
23 req.checkBody('name', 'Should have a valid name').isVideoNameValid() 21 req.checkBody('name', 'Should have a valid name').isVideoNameValid()
24 req.checkBody('description', 'Should have a valid description').isVideoDescriptionValid() 22 req.checkBody('description', 'Should have a valid description').isVideoDescriptionValid()
25 req.checkBody('tags', 'Should have correct tags').isVideoTagsValid() 23 req.checkBody('tags', 'Should have correct tags').isVideoTagsValid()