From 3b3a28e3e41b3f03110167a69633e80e15aab807 Mon Sep 17 00:00:00 2001 From: chimpdev Date: Sat, 14 Sep 2024 14:12:22 +0300 Subject: [PATCH] Refactor bot-denies route to remove param validation for 'id' parameter --- server/src/routes/bot-denies/[id].js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/routes/bot-denies/[id].js b/server/src/routes/bot-denies/[id].js index 22e8e518..f04699c0 100644 --- a/server/src/routes/bot-denies/[id].js +++ b/server/src/routes/bot-denies/[id].js @@ -7,8 +7,7 @@ module.exports = { delete: [ checkAuthentication, useRateLimiter({ maxRequests: 10, perMinutes: 1 }), - param('id') - .isMongoId().withMessage('Invalid ID.'), + param('id'), async (request, response) => { const errors = validationResult(request); if (!errors.isEmpty()) return response.sendError(errors.array()[0].msg, 400);