Actually store event details (oops)

This commit is contained in:
2024-02-26 11:15:09 -05:00
parent 9554240824
commit f1fa3c8987
2 changed files with 16 additions and 1 deletions

View File

@ -62,13 +62,14 @@ export async function onRequestPost(context: RequestContext) {
const id = `${now.getTime()}${crypto.randomUUID().replaceAll("-", "")}`;
await context.env.D1.prepare(
"INSERT INTO events (answer, created_at, created_by, day, id, month, type, year) VALUES (?, ?, ?, ?, ?, ?, ?, ?);",
"INSERT INTO events (answer, created_at, created_by, day, details, id, month, type, year) VALUES (?, ?, ?, ?, ?, ?, ?, ?);",
)
.bind(
context.data.body.answer || null,
now.getTime(),
context.data.current_user.id,
day,
details,
id,
currentMonth,
type,