Skip to content

Commit

Permalink
fix: check member confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayllyz committed Jul 24, 2024
1 parent 10804bc commit e0454a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/api/src/handlers/assemblies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
1 change: 0 additions & 1 deletion apps/api/src/routes/assemblies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ export const handleAssemblyCheckIn = createRoute({
security: [{ Bearer: [] }],
middleware: authMiddleware,
request: {
params: idParamValidator,
body: {
content: {
'application/json': {
Expand Down

0 comments on commit e0454a0

Please sign in to comment.