X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Fbulk.ts;h=cfb16d352997500db4239a4e1aae7a20579d96b6;hb=f479685678406a5df864d89615b33d29085ebfc6;hp=f9b0f565a9e1a19ebb3fbc9cc6afb234edb31572;hpb=cdd8f7790c759664fe4d0962efa550cf1a8e37eb;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/validators/bulk.ts b/server/middlewares/validators/bulk.ts index f9b0f565a..cfb16d352 100644 --- a/server/middlewares/validators/bulk.ts +++ b/server/middlewares/validators/bulk.ts @@ -6,6 +6,7 @@ import { UserRight } from '@shared/models' import { BulkRemoveCommentsOfBody } from '@shared/models/bulk/bulk-remove-comments-of-body.model' import { logger } from '../../helpers/logger' import { areValidationErrors } from './utils' +import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' const bulkRemoveCommentsOfValidator = [ body('accountName').exists().withMessage('Should have an account name with host'), @@ -22,7 +23,7 @@ const bulkRemoveCommentsOfValidator = [ const body = req.body as BulkRemoveCommentsOfBody if (body.scope === 'instance' && user.hasRight(UserRight.REMOVE_ANY_VIDEO_COMMENT) !== true) { - return res.status(403) + return res.status(HttpStatusCode.FORBIDDEN_403) .json({ error: 'User cannot remove any comments of this instance.' })