Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Skip approval process for gamenights
  • Loading branch information
regalijan committed Mar 14, 2024
1 parent 50a36db commit 508f5c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion functions/api/events-team/events/new.ts
Expand Up @@ -62,16 +62,18 @@ 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, details, id, month, type, year) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);",
"INSERT INTO events (answer, approved, created_at, created_by, day, details, id, month, pending, type, year) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);",
)
.bind(
context.data.body.answer || null,
now.getTime(),
Number(type === "gamenight"),
context.data.current_user.id,
day,
details,
id,
currentMonth,
Number(type !== "gamenight"),
type,
currentYear,
)
Expand Down

0 comments on commit 508f5c6

Please sign in to comment.