How did this go unnoticed for so long
This commit is contained in:
parent
69f407142d
commit
43b1f1d136
@ -127,9 +127,9 @@ export async function onRequestPut(context: RequestContext) {
|
|||||||
"SELECT open FROM inactivity_notices WHERE id = ?;",
|
"SELECT open FROM inactivity_notices WHERE id = ?;",
|
||||||
)
|
)
|
||||||
.bind(context.params.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);
|
return jsonError("Cannot modify a closed inactivity notice", 403);
|
||||||
|
|
||||||
const { departments, end, reason, start } = context.data.body;
|
const { departments, end, reason, start } = context.data.body;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user