Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Set approved property in d1 on inactivity closure
  • Loading branch information
regalijan committed Oct 26, 2023
1 parent 559767b commit 528ba3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/api/inactivity/[id].ts
Expand Up @@ -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) {
Expand Down

0 comments on commit 528ba3a

Please sign in to comment.