]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/account.ts
Cleanup useless express validator messages
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / account.ts
index e529c831d541ea575e80209a8d6f3d623848dc00..a7534ced523441c8b4d1bd11c840cb6b70901da6 100644 (file)
@@ -5,7 +5,8 @@ import { logger } from '../../helpers/logger'
 import { areValidationErrors, doesAccountNameWithHostExist, doesLocalAccountNameExist } from './shared'
 
 const localAccountValidator = [
-  param('name').custom(isAccountNameValid).withMessage('Should have a valid account name'),
+  param('name')
+    .custom(isAccountNameValid),
 
   async (req: express.Request, res: express.Response, next: express.NextFunction) => {
     logger.debug('Checking localAccountValidator parameters', { parameters: req.params })
@@ -18,7 +19,8 @@ const localAccountValidator = [
 ]
 
 const accountNameWithHostGetValidator = [
-  param('accountName').exists().withMessage('Should have an account name with host'),
+  param('accountName')
+    .exists(),
 
   async (req: express.Request, res: express.Response, next: express.NextFunction) => {
     logger.debug('Checking accountsNameWithHostGetValidator parameters', { parameters: req.params })