Actually store event details (oops)
This commit is contained in:
parent
9554240824
commit
f1fa3c8987
@ -150,6 +150,20 @@ export default function () {
|
|||||||
{event.type.toUpperCase()}
|
{event.type.toUpperCase()}
|
||||||
</Text>
|
</Text>
|
||||||
</Box>
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Heading size="sm">Event Details</Heading>
|
||||||
|
<Text fontSize="sm" pt="2">
|
||||||
|
{event.details}
|
||||||
|
</Text>
|
||||||
|
</Box>
|
||||||
|
{event.type === "rotw" ? (
|
||||||
|
<Box>
|
||||||
|
<Heading size="sm">RIDDLE ANSWER</Heading>
|
||||||
|
<Text fontSize="sm" pt="2">
|
||||||
|
{event.answer}
|
||||||
|
</Text>
|
||||||
|
</Box>
|
||||||
|
) : null}
|
||||||
<Box>
|
<Box>
|
||||||
<Heading size="sm">Host</Heading>
|
<Heading size="sm">Host</Heading>
|
||||||
<Text fontSize="sm" pt="2">
|
<Text fontSize="sm" pt="2">
|
||||||
|
@ -62,13 +62,14 @@ export async function onRequestPost(context: RequestContext) {
|
|||||||
const id = `${now.getTime()}${crypto.randomUUID().replaceAll("-", "")}`;
|
const id = `${now.getTime()}${crypto.randomUUID().replaceAll("-", "")}`;
|
||||||
|
|
||||||
await context.env.D1.prepare(
|
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(
|
.bind(
|
||||||
context.data.body.answer || null,
|
context.data.body.answer || null,
|
||||||
now.getTime(),
|
now.getTime(),
|
||||||
context.data.current_user.id,
|
context.data.current_user.id,
|
||||||
day,
|
day,
|
||||||
|
details,
|
||||||
id,
|
id,
|
||||||
currentMonth,
|
currentMonth,
|
||||||
type,
|
type,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user