From e0454a026b81f690c958638162f82e1a6c67d4cb Mon Sep 17 00:00:00 2001 From: Antony David Date: Wed, 24 Jul 2024 09:58:07 +0200 Subject: [PATCH] fix: check member confirm --- apps/api/src/handlers/assemblies.ts | 4 ++-- apps/api/src/routes/assemblies.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/api/src/handlers/assemblies.ts b/apps/api/src/handlers/assemblies.ts index 9fd9a527..39a561e2 100644 --- a/apps/api/src/handlers/assemblies.ts +++ b/apps/api/src/handlers/assemblies.ts @@ -137,14 +137,14 @@ assemblies.openapi(isAlreadyConfirmed, async (c) => { return c.json({ error: assembly.error }, assembly.status); } - const { data: attendee, error: attendeeError } = await supabase + const { data: attendee } = await supabase .from('ASSEMBLIES_ATTENDEES') .select('id') .eq('id_assembly', assembly.id) .eq('id_member', user.id) .single(); - if (attendeeError || attendee) { + if (attendee) { return c.json({ confirmed: true }, 200); } diff --git a/apps/api/src/routes/assemblies.ts b/apps/api/src/routes/assemblies.ts index 19d53fca..cc5aab31 100644 --- a/apps/api/src/routes/assemblies.ts +++ b/apps/api/src/routes/assemblies.ts @@ -227,7 +227,6 @@ export const handleAssemblyCheckIn = createRoute({ security: [{ Bearer: [] }], middleware: authMiddleware, request: { - params: idParamValidator, body: { content: { 'application/json': {