Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Drop game appeals from table on closure
  • Loading branch information
regalijan committed Oct 29, 2023
1 parent 1197564 commit 0e76704
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions functions/api/game-appeals/[id]/accept.ts
Expand Up @@ -20,6 +20,9 @@ export async function onRequestPost(context: RequestContext) {
};

await context.env.DATA.delete(`gameappeal_${context.params.id as string}`);
await context.env.D1.prepare("DELETE FROM game_appeals WHERE id = ?;")
.bind(context.params.id)
.run();

if (!banList[data.roblox_id])
return new Response(null, {
Expand Down
3 changes: 3 additions & 0 deletions functions/api/game-appeals/[id]/deny.ts
Expand Up @@ -10,6 +10,9 @@ export async function onRequestPost(context: RequestContext) {
const appealData = JSON.parse(appeal);

await context.env.DATA.delete(`gameappeal_${appealId}`);
await context.env.D1.prepare("DELETE FROM game_appeals WHERE id = ?;")
.bind(appealId)
.run();
await context.env.DATA.put(
`gameappealblock_${appealData.roblox_id}`,
`${Date.now() + 2592000000}`,
Expand Down

0 comments on commit 0e76704

Please sign in to comment.