aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-08-04 22:32:36 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-08-04 22:33:38 +0200
commit9bd2662976a75d3b03364cdbe6419e57c80f99a6 (patch)
tree0b5289660f843a8ba7f13aa79d458f53c94b36d9 /server/middlewares/validators/videos.js
parente4c556196d7b31111f17596840d2e1d60caa7dcb (diff)
downloadPeerTube-9bd2662976a75d3b03364cdbe6419e57c80f99a6.tar.gz
PeerTube-9bd2662976a75d3b03364cdbe6419e57c80f99a6.tar.zst
PeerTube-9bd2662976a75d3b03364cdbe6419e57c80f99a6.zip
Implement user API (create, update, remove, list)
Diffstat (limited to 'server/middlewares/validators/videos.js')
-rw-r--r--server/middlewares/validators/videos.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/middlewares/validators/videos.js b/server/middlewares/validators/videos.js
index 422f3642f..9d21ee16f 100644
--- a/server/middlewares/validators/videos.js
+++ b/server/middlewares/validators/videos.js
@@ -18,6 +18,7 @@ const validatorsVideos = {
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.checkFiles('videofile[0].originalname', 'Should have an input video').notEmpty()
21 // TODO: move to constants and function
21 req.checkFiles('videofile[0].mimetype', 'Should have a correct mime type').matches(/video\/(webm)|(mp4)|(ogg)/i) 22 req.checkFiles('videofile[0].mimetype', 'Should have a correct mime type').matches(/video\/(webm)|(mp4)|(ogg)/i)
22 req.checkBody('name', 'Should have a valid name').isVideoNameValid() 23 req.checkBody('name', 'Should have a valid name').isVideoNameValid()
23 req.checkBody('description', 'Should have a valid description').isVideoDescriptionValid() 24 req.checkBody('description', 'Should have a valid description').isVideoDescriptionValid()