Skip to content

Commit

Permalink
Refactor bot-denies route to remove param validation for 'id' parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
chimpdev committed Sep 14, 2024
1 parent cd8113c commit 3b3a28e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server/src/routes/bot-denies/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3b3a28e

Please sign in to comment.