Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't select whole row for day slot check
  • Loading branch information
regalijan committed Feb 3, 2025
1 parent 8654fa9 commit cf90ebb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/api/events-team/events/new.ts
Expand Up @@ -23,7 +23,7 @@ export async function onRequestPost(context: RequestContext) {

if (
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)
.first()
Expand Down

0 comments on commit cf90ebb

Please sign in to comment.