Skip to content

Commit

Permalink
no hard-coding
Browse files Browse the repository at this point in the history
  • Loading branch information
sdagg9 committed Aug 13, 2024
1 parent e12924c commit b52a335
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/services/checkin/checkin-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ export async function checkInUserToEvent(
}

await updateAttendanceRecords(eventId, userId);
await assignPixelsToUser(userId, 20);

const event = await Database.EVENTS.findOne({ eventId });
if (!event) {
throw new Error("Event not found");
}
await assignPixelsToUser(userId, event.points);
}

export function generateQrHash(userId: string, expTime: number) {
Expand Down

0 comments on commit b52a335

Please sign in to comment.