Skip approval process for gamenights
This commit is contained in:
parent
50a36dbeb8
commit
508f5c6b98
@ -62,16 +62,18 @@ 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, details, id, month, type, year) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);",
|
"INSERT INTO events (answer, approved, created_at, created_by, day, details, id, month, pending, type, year) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);",
|
||||||
)
|
)
|
||||||
.bind(
|
.bind(
|
||||||
context.data.body.answer || null,
|
context.data.body.answer || null,
|
||||||
now.getTime(),
|
now.getTime(),
|
||||||
|
Number(type === "gamenight"),
|
||||||
context.data.current_user.id,
|
context.data.current_user.id,
|
||||||
day,
|
day,
|
||||||
details,
|
details,
|
||||||
id,
|
id,
|
||||||
currentMonth,
|
currentMonth,
|
||||||
|
Number(type !== "gamenight"),
|
||||||
type,
|
type,
|
||||||
currentYear,
|
currentYear,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user