aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/account.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-17 14:27:04 +0200
committerChocobozzz <me@florianbigard.com>2022-08-17 14:27:04 +0200
commit396f6f0140b0f76162e2378fd5a61e2f888673ed (patch)
treea5bd668bfc7dca7f311b9fc42ebb8bd01f462648 /server/middlewares/validators/account.ts
parent97eba003a9d0adcb0cab9190f566327b1417c7d3 (diff)
downloadPeerTube-396f6f0140b0f76162e2378fd5a61e2f888673ed.tar.gz
PeerTube-396f6f0140b0f76162e2378fd5a61e2f888673ed.tar.zst
PeerTube-396f6f0140b0f76162e2378fd5a61e2f888673ed.zip
Cleanup useless express validator messages
Diffstat (limited to 'server/middlewares/validators/account.ts')
-rw-r--r--server/middlewares/validators/account.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/middlewares/validators/account.ts b/server/middlewares/validators/account.ts
index e529c831d..a7534ced5 100644
--- a/server/middlewares/validators/account.ts
+++ b/server/middlewares/validators/account.ts
@@ -5,7 +5,8 @@ import { logger } from '../../helpers/logger'
5import { areValidationErrors, doesAccountNameWithHostExist, doesLocalAccountNameExist } from './shared' 5import { areValidationErrors, doesAccountNameWithHostExist, doesLocalAccountNameExist } from './shared'
6 6
7const localAccountValidator = [ 7const localAccountValidator = [
8 param('name').custom(isAccountNameValid).withMessage('Should have a valid account name'), 8 param('name')
9 .custom(isAccountNameValid),
9 10
10 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 11 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
11 logger.debug('Checking localAccountValidator parameters', { parameters: req.params }) 12 logger.debug('Checking localAccountValidator parameters', { parameters: req.params })
@@ -18,7 +19,8 @@ const localAccountValidator = [
18] 19]
19 20
20const accountNameWithHostGetValidator = [ 21const accountNameWithHostGetValidator = [
21 param('accountName').exists().withMessage('Should have an account name with host'), 22 param('accountName')
23 .exists(),
22 24
23 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 25 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
24 logger.debug('Checking accountsNameWithHostGetValidator parameters', { parameters: req.params }) 26 logger.debug('Checking accountsNameWithHostGetValidator parameters', { parameters: req.params })