Create forgotten event endpoint
This commit is contained in:
parent
8711794bc4
commit
30d9eeed7f
13
functions/api/events-team/events/[id]/forgotten.ts
Normal file
13
functions/api/events-team/events/[id]/forgotten.ts
Normal 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,
|
||||
});
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user