Set approved property in d1 on inactivity closure
This commit is contained in:
@ -70,9 +70,9 @@ export async function onRequestPost(context: RequestContext) {
|
||||
const approved = !Object.values(decisions).find((d) => !d);
|
||||
|
||||
await context.env.D1.prepare(
|
||||
"UPDATE inactivity_notices SET open = 0 WHERE id = ?;",
|
||||
"UPDATE inactivity_notices SET approved = ?, open = 0 WHERE id = ?;",
|
||||
)
|
||||
.bind(context.params.id)
|
||||
.bind(context.params.id, Number(approved))
|
||||
.run();
|
||||
|
||||
if (requestedNotice.fcm_token) {
|
||||
|
Reference in New Issue
Block a user