X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Fvideos%2Fvideo-blacklist.ts;h=f065f101ccf87af7bdbae42f463d02a823d20ee5;hb=396f6f0140b0f76162e2378fd5a61e2f888673ed;hp=3a4937b7b610a37cb0f2b6566dc2c44659f41d5c;hpb=c4fa01f7c45b66b112ebd08abce744b7c4041feb;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/validators/videos/video-blacklist.ts b/server/middlewares/validators/videos/video-blacklist.ts index 3a4937b7b..f065f101c 100644 --- a/server/middlewares/validators/videos/video-blacklist.ts +++ b/server/middlewares/validators/videos/video-blacklist.ts @@ -1,4 +1,4 @@ -import * as express from 'express' +import express from 'express' import { body, query } from 'express-validator' import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' import { isBooleanValid, toBooleanOrNull, toIntOrNull } from '../../../helpers/custom-validators/misc' @@ -29,7 +29,7 @@ const videosBlacklistAddValidator = [ .custom(isBooleanValid).withMessage('Should have a valid unfederate boolean'), body('reason') .optional() - .custom(isVideoBlacklistReasonValid).withMessage('Should have a valid reason'), + .custom(isVideoBlacklistReasonValid), async (req: express.Request, res: express.Response, next: express.NextFunction) => { logger.debug('Checking videosBlacklistAdd parameters', { parameters: req.params })