Create forgotten event endpoint

This commit is contained in:
Regalijan 2024-09-13 15:07:57 -04:00
parent 8711794bc4
commit 30d9eeed7f
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -0,0 +1,13 @@
export async function onRequestPost(context: RequestContext) {
const id = context.params.id as string;
await context.env.D1.prepare(
"UPDATE events SET performed_at = 0 WHERE id = ?;",
)
.bind(id)
.run();
return new Response(null, {
status: 204,
});
}