]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/videos/video-blacklist.ts
Cleanup useless express validator messages
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / videos / video-blacklist.ts
index 21141d84d1204f009fbd4c7fa6e7b6e91b3521c5..f065f101ccf87af7bdbae42f463d02a823d20ee5 100644 (file)
@@ -1,6 +1,6 @@
-import * as express from 'express'
+import express from 'express'
 import { body, query } from 'express-validator'
-import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
+import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
 import { isBooleanValid, toBooleanOrNull, toIntOrNull } from '../../../helpers/custom-validators/misc'
 import { isVideoBlacklistReasonValid, isVideoBlacklistTypeValid } from '../../../helpers/custom-validators/video-blacklist'
 import { logger } from '../../../helpers/logger'
@@ -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 })