From 69f616ab3aeefd6ce330600604df90f2f48bfe3b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sun, 11 Jun 2017 11:02:35 +0200 Subject: Use shared models --- server/middlewares/validators/videos.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/middlewares') 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' import { logger, isVideoDurationValid } from '../../helpers' function videosAddValidator (req: express.Request, res: express.Response, next: express.NextFunction) { - req.checkBody('videofile', 'Should have a valid file').isVideoFile(req.files) + // FIXME: Don't write an error message, it seems there is a bug with express-validator + // 'Should have a valid file' + req.checkBody('videofile').isVideoFile(req.files) req.checkBody('name', 'Should have a valid name').isVideoNameValid() req.checkBody('category', 'Should have a valid category').isVideoCategoryValid() req.checkBody('licence', 'Should have a valid licence').isVideoLicenceValid() -- cgit v1.2.3