Set approved field on appeal action
This commit is contained in:
parent
33f90300ca
commit
1a35cca6cf
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user