From 16ef47d8bf155d85b536fdd34233d3433455d0dd Mon Sep 17 00:00:00 2001 From: blake Date: Mon, 2 Nov 2026 16:41:33 -0600 Subject: [PATCH] fix: update return types for redirectGrouped and groupFailure functions Modified the return types of the redirectGrouped and groupFailure functions in signup-http.tsx to support Promise in addition to Response. This change enhances the handling of asynchronous operations within the signup process, ensuring better integration with modern JavaScript practices. --- src/signup-http.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/signup-http.tsx b/src/signup-http.tsx index a7acf03..3cf84ce 100644 --- a/src/signup-http.tsx +++ b/src/signup-http.tsx @@ -291,7 +291,7 @@ function redirectGrouped( services: SignupServices, pageShiftId: number, signups: Array<{ signupId: number; shiftId: number; manageToken: string | null }>, -): Response { +): Promise | Response { const primary = signups.find((row) => row.shiftId === pageShiftId) ?? signups[0]; if (!primary) return html(c, services, 'That page is not available ยท Hope Volunteer', , 404); const issued = signups.every((row) => row.manageToken) @@ -315,7 +315,7 @@ function groupFailure( selectedDateIds: number[], reason: 'not_found' | 'closed' | 'early' | 'full' | 'duplicate' | 'conflict', shiftId: number, -): Response { +): Promise | Response { const failed = getPublicShift(services.db, shiftId, services.now()); const label = failed ? shiftChoiceLabel(failed, shift) : undefined; const errors: SignupErrors = {};