]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/bulk.ts
Merge branch 'release/5.0.0' into develop
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / bulk.ts
index 6fec5814930e6a3ab5ee3bde1b9b025de1ba4e44..a1cea8032e3dcbc68c824e15d92123029a4d9f7f 100644 (file)
@@ -1,19 +1,17 @@
-import * as express from 'express'
+import express from 'express'
 import { body } from 'express-validator'
 import { isBulkRemoveCommentsOfScopeValid } from '@server/helpers/custom-validators/bulk'
 import { HttpStatusCode, UserRight } from '@shared/models'
 import { BulkRemoveCommentsOfBody } from '@shared/models/bulk/bulk-remove-comments-of-body.model'
-import { logger } from '../../helpers/logger'
 import { areValidationErrors, doesAccountNameWithHostExist } from './shared'
 
 const bulkRemoveCommentsOfValidator = [
-  body('accountName').exists().withMessage('Should have an account name with host'),
+  body('accountName')
+    .exists(),
   body('scope')
-    .custom(isBulkRemoveCommentsOfScopeValid).withMessage('Should have a valid scope'),
+    .custom(isBulkRemoveCommentsOfScopeValid),
 
   async (req: express.Request, res: express.Response, next: express.NextFunction) => {
-    logger.debug('Checking bulkRemoveCommentsOfValidator parameters', { parameters: req.body })
-
     if (areValidationErrors(req, res)) return
     if (!await doesAccountNameWithHostExist(req.body.accountName, res)) return