Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Set approved field on appeal action
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent 33f9030 commit 1a35cca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functions/api/appeals/[id]/accept.ts
Expand Up @@ -20,7 +20,7 @@ export async function onRequestPost(context: RequestContext) {

const { current_user: currentUser } = context.data;

await context.env.D1.prepare("UPDATE appeals SET open = 0 WHERE id = ?;")
await context.env.D1.prepare("UPDATE appeals SET approved = 1, open = 0 WHERE id = ?;")
.bind(context.params.id)
.run();

Expand Down
2 changes: 1 addition & 1 deletion functions/api/appeals/[id]/deny.ts
Expand Up @@ -19,7 +19,7 @@ export async function onRequestPost(context: RequestContext) {
return jsonError("Failed to deny appeal", 500);
}

await context.env.D1.prepare("UPDATE appeals SET open = 0 WHERE id = ?;")
await context.env.D1.prepare("UPDATE appeals SET approved = 0, open = 0 WHERE id = ?;")
.bind(context.params.id)
.run();

Expand Down

0 comments on commit 1a35cca

Please sign in to comment.