aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/bulk.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/bulk.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/bulk.ts')
-rw-r--r--server/middlewares/validators/bulk.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/middlewares/validators/bulk.ts b/server/middlewares/validators/bulk.ts
index 1cfc7481e..5bc15e076 100644
--- a/server/middlewares/validators/bulk.ts
+++ b/server/middlewares/validators/bulk.ts
@@ -7,9 +7,10 @@ import { logger } from '../../helpers/logger'
7import { areValidationErrors, doesAccountNameWithHostExist } from './shared' 7import { areValidationErrors, doesAccountNameWithHostExist } from './shared'
8 8
9const bulkRemoveCommentsOfValidator = [ 9const bulkRemoveCommentsOfValidator = [
10 body('accountName').exists().withMessage('Should have an account name with host'), 10 body('accountName')
11 .exists(),
11 body('scope') 12 body('scope')
12 .custom(isBulkRemoveCommentsOfScopeValid).withMessage('Should have a valid scope'), 13 .custom(isBulkRemoveCommentsOfScopeValid),
13 14
14 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 15 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
15 logger.debug('Checking bulkRemoveCommentsOfValidator parameters', { parameters: req.body }) 16 logger.debug('Checking bulkRemoveCommentsOfValidator parameters', { parameters: req.body })