aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/videos.ts')
-rw-r--r--server/middlewares/validators/videos.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/middlewares/validators/videos.ts b/server/middlewares/validators/videos.ts
index e99cdefb1..03742a522 100644
--- a/server/middlewares/validators/videos.ts
+++ b/server/middlewares/validators/videos.ts
@@ -8,7 +8,9 @@ import { CONSTRAINTS_FIELDS, SEARCHABLE_COLUMNS } from '../../initializers'
8import { logger, isVideoDurationValid } from '../../helpers' 8import { logger, isVideoDurationValid } from '../../helpers'
9 9
10function videosAddValidator (req: express.Request, res: express.Response, next: express.NextFunction) { 10function videosAddValidator (req: express.Request, res: express.Response, next: express.NextFunction) {
11 req.checkBody('videofile', 'Should have a valid file').isVideoFile(req.files) 11 // FIXME: Don't write an error message, it seems there is a bug with express-validator
12 // 'Should have a valid file'
13 req.checkBody('videofile').isVideoFile(req.files)
12 req.checkBody('name', 'Should have a valid name').isVideoNameValid() 14 req.checkBody('name', 'Should have a valid name').isVideoNameValid()
13 req.checkBody('category', 'Should have a valid category').isVideoCategoryValid() 15 req.checkBody('category', 'Should have a valid category').isVideoCategoryValid()
14 req.checkBody('licence', 'Should have a valid licence').isVideoLicenceValid() 16 req.checkBody('licence', 'Should have a valid licence').isVideoLicenceValid()