Skip to content

Commit

Permalink
Refactor findOneAndDelete to use 'bot.id' instead of id in bot-denies…
Browse files Browse the repository at this point in the history
… route
  • Loading branch information
chimpdev committed Sep 14, 2024
1 parent b8a1834 commit cd8113c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/routes/bot-denies/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {

const { id } = matchedData(request);

BotDeny.findOneAndDelete({ id })
BotDeny.findOneAndDelete({ 'bot.id': id })
.then(() => response.status(204).end())
.catch(error => {
logger.error('There was an error while trying to delete a bot deny record:', error);
Expand Down

0 comments on commit cd8113c

Please sign in to comment.