From e915cde30ec47258a2beeec5ca748c928b59858c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 20 Jun 2023 14:17:34 +0200 Subject: Fix runner api rate limit bypass --- server/controllers/api/bulk.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/controllers/api/bulk.ts') diff --git a/server/controllers/api/bulk.ts b/server/controllers/api/bulk.ts index 51292175b..c41c7d378 100644 --- a/server/controllers/api/bulk.ts +++ b/server/controllers/api/bulk.ts @@ -4,10 +4,12 @@ import { bulkRemoveCommentsOfValidator } from '@server/middlewares/validators/bu import { VideoCommentModel } from '@server/models/video/video-comment' import { HttpStatusCode } from '@shared/models' import { BulkRemoveCommentsOfBody } from '@shared/models/bulk/bulk-remove-comments-of-body.model' -import { asyncMiddleware, authenticate } from '../../middlewares' +import { apiRateLimiter, asyncMiddleware, authenticate } from '../../middlewares' const bulkRouter = express.Router() +bulkRouter.use(apiRateLimiter) + bulkRouter.post('/remove-comments-of', authenticate, asyncMiddleware(bulkRemoveCommentsOfValidator), -- cgit v1.2.3