diff --git a/functions/api/events-team/events/new.ts b/functions/api/events-team/events/new.ts index 49e4d20..2c7ff2d 100644 --- a/functions/api/events-team/events/new.ts +++ b/functions/api/events-team/events/new.ts @@ -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()