Only check for events not denied yet on /new endpoint
This commit is contained in:
parent
98b191167b
commit
69f407142d
@ -23,7 +23,7 @@ export async function onRequestPost(context: RequestContext) {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
await context.env.D1.prepare(
|
await context.env.D1.prepare(
|
||||||
"SELECT * FROM events WHERE day = ? AND month = ? AND type = ? AND year = ?;",
|
"SELECT * FROM events WHERE approved = false AND day = ? AND month = ? AND type = ? AND year = ?;",
|
||||||
)
|
)
|
||||||
.bind(day, currentMonth, type, currentYear)
|
.bind(day, currentMonth, type, currentYear)
|
||||||
.first()
|
.first()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user