From 472299d4f5a780304eee4f2b80814c043499b3d5 Mon Sep 17 00:00:00 2001 From: Regalijan Date: Tue, 2 Jun 2026 18:42:19 -0400 Subject: [PATCH] Fix math --- app/routes/book-event.tsx | 2 +- functions/api/events-team/events/new.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routes/book-event.tsx b/app/routes/book-event.tsx index d7b3b4a..828cdae 100644 --- a/app/routes/book-event.tsx +++ b/app/routes/book-event.tsx @@ -44,7 +44,7 @@ export async function loader({ context }: { context: RequestContext }) { }, }); - return preBookedEvents > 3; + return preBookedEvents >= 3; } export default function () { diff --git a/functions/api/events-team/events/new.ts b/functions/api/events-team/events/new.ts index 4742aaf..48b7b9c 100644 --- a/functions/api/events-team/events/new.ts +++ b/functions/api/events-team/events/new.ts @@ -33,7 +33,7 @@ export async function onRequestPost(context: RequestContext) { month: currentMonth, year: currentYear, }, - })) > 3 + })) >= 3 ) return jsonError("Too many events scheduled", 403);