Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
How did this go unnoticed for so long
  • Loading branch information
regalijan committed Feb 15, 2024
1 parent 69f4071 commit 43b1f1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/api/inactivity/[id].ts
Expand Up @@ -127,9 +127,9 @@ export async function onRequestPut(context: RequestContext) {
"SELECT open FROM inactivity_notices WHERE id = ?;",
)
.bind(context.params.id)
.run();
.first();

if (!Boolean(d1entry.results.at(0)?.open))
if (!Boolean(d1entry?.open))
return jsonError("Cannot modify a closed inactivity notice", 403);

const { departments, end, reason, start } = context.data.body;
Expand Down

0 comments on commit 43b1f1d

Please sign in to comment.