Skip to content

Commit

Permalink
fix: remove cache on vote
Browse files Browse the repository at this point in the history
  • Loading branch information
skinmaker1345 committed Mar 3, 2024
1 parent b8c4880 commit aaf82a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pages/api/v2/bots/[id]/vote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const BotVote = RequestHandler()
const vote = await put.voteBot(user, bot.id)
if (vote === null) return ResponseWrapper(res, { code: 401 })
else if (vote === true) {
get.bot.clear(req.query.id)
sendWebhook(bot, {
type: 'bot',
data: {
Expand Down
1 change: 1 addition & 0 deletions pages/api/v2/servers/[id]/vote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const ServerVote = RequestHandler()
const vote = await put.voteServer(user, server.id)
if (vote === null) return ResponseWrapper(res, { code: 401 })
else if (vote === true) {
get.server.clear(req.query.id)
sendWebhook(server, {
type: 'server',
data: {
Expand Down

0 comments on commit aaf82a9

Please sign in to comment.