]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/user-history.ts
Cleanup useless express validator messages
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / user-history.ts
index 541910be557d0c36c10b0e91491fcc568a814636..23a00888ce41902ad97658cc6e2b96f42021381e 100644 (file)
@@ -7,7 +7,7 @@ import { areValidationErrors } from './shared'
 const userHistoryListValidator = [
   query('search')
     .optional()
-    .custom(exists).withMessage('Should have a valid search'),
+    .custom(exists),
 
   (req: express.Request, res: express.Response, next: express.NextFunction) => {
     logger.debug('Checking userHistoryListValidator parameters', { parameters: req.query })
@@ -34,7 +34,7 @@ const userHistoryRemoveAllValidator = [
 
 const userHistoryRemoveElementValidator = [
   param('videoId')
-    .custom(isIdValid).withMessage('Should have a valid video id'),
+    .custom(isIdValid),
 
   (req: express.Request, res: express.Response, next: express.NextFunction) => {
     logger.debug('Checking userHistoryRemoveElementValidator parameters', { parameters: req.params })