12 lines
263 B
TypeScript
12 lines
263 B
TypeScript
export async function onRequestPost(context: RequestContext) {
|
|
await context.env.D1.prepare(
|
|
"UPDATE events SET answered_at = ? WHERE id = ?;",
|
|
)
|
|
.bind(Date.now(), context.params.id)
|
|
.run();
|
|
|
|
return new Response(null, {
|
|
status: 204,
|
|
});
|
|
}
|