Don't select whole row for day slot check
This commit is contained in:
parent
8654fa9676
commit
cf90ebb47f
@ -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 (approved = 1 OR pending =1) AND day = ? AND month = ? AND type = ? AND year = ?;",
|
"SELECT id FROM events WHERE (approved = 1 OR pending = 1) 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