From 396f6f0140b0f76162e2378fd5a61e2f888673ed Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 17 Aug 2022 14:27:04 +0200 Subject: Cleanup useless express validator messages --- server/middlewares/validators/videos/video-imports.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'server/middlewares/validators/videos/video-imports.ts') diff --git a/server/middlewares/validators/videos/video-imports.ts b/server/middlewares/validators/videos/video-imports.ts index 3115acb21..0ab9e6e6f 100644 --- a/server/middlewares/validators/videos/video-imports.ts +++ b/server/middlewares/validators/videos/video-imports.ts @@ -19,13 +19,13 @@ import { getCommonVideoEditAttributes } from './videos' const videoImportAddValidator = getCommonVideoEditAttributes().concat([ body('channelId') .customSanitizer(toIntOrNull) - .custom(isIdValid).withMessage('Should have correct video channel id'), + .custom(isIdValid), body('targetUrl') .optional() - .custom(isVideoImportTargetUrlValid).withMessage('Should have a valid video import target URL'), + .custom(isVideoImportTargetUrlValid), body('magnetUri') .optional() - .custom(isVideoMagnetUriValid).withMessage('Should have a valid video magnet URI'), + .custom(isVideoMagnetUriValid), body('torrentfile') .custom((value, { req }) => isVideoImportTorrentFile(req.files)) .withMessage( @@ -95,7 +95,7 @@ const videoImportAddValidator = getCommonVideoEditAttributes().concat([ const getMyVideoImportsValidator = [ query('videoChannelSyncId') .optional() - .custom(isIdValid).withMessage('Should have correct videoChannelSync id'), + .custom(isIdValid), (req: express.Request, res: express.Response, next: express.NextFunction) => { logger.debug('Checking getMyVideoImportsValidator parameters', { parameters: req.params }) @@ -108,7 +108,7 @@ const getMyVideoImportsValidator = [ const videoImportDeleteValidator = [ param('id') - .custom(isIdValid).withMessage('Should have correct import id'), + .custom(isIdValid), async (req: express.Request, res: express.Response, next: express.NextFunction) => { logger.debug('Checking videoImportDeleteValidator parameters', { parameters: req.params }) @@ -131,7 +131,7 @@ const videoImportDeleteValidator = [ const videoImportCancelValidator = [ param('id') - .custom(isIdValid).withMessage('Should have correct import id'), + .custom(isIdValid), async (req: express.Request, res: express.Response, next: express.NextFunction) => { logger.debug('Checking videoImportCancelValidator parameters', { parameters: req.params }) -- cgit v1.2.3