From 21bd6fdaecb4ff6458733a066deb152f5cf286c5 Mon Sep 17 00:00:00 2001 From: Kanishk Sachdev <64576646+kensac@users.noreply.github.com> Date: Sat, 28 Mar 2026 08:32:32 -0400 Subject: [PATCH] push (#755) --- src/modules/user/user.controller.ts | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/src/modules/user/user.controller.ts b/src/modules/user/user.controller.ts index 166d9293..bdf2b73f 100644 --- a/src/modules/user/user.controller.ts +++ b/src/modules/user/user.controller.ts @@ -671,8 +671,10 @@ export class UserController { ) data: CreateUserScanEntity, ) { - const hasUser = await this.userRepo.findOne(id).exec(); - const event = await this.eventRepo.findOne(eventId).exec(); + const [hasUser, event] = await Promise.all([ + this.userRepo.findOne(id).exec(), + this.eventRepo.findOne(eventId).exec(), + ]); if (!hasUser) { throw new HttpException("user not found", HttpStatus.BAD_REQUEST); @@ -703,26 +705,6 @@ export class UserController { e, ); } - - // Send Gotify notification for check-in - try { - const totalScans = await this.scanRepo - .findAll() - .byHackathon(hackathonId) - .resultSize(); - - const userName = `${hasUser.firstName} ${hasUser.lastName}`; - - await this.gotifyService.sendCheckinNotification( - userName, - hasUser.email, - event.name, - totalScans, - ); - } catch (error) { - console.log(`Failed to send Gotify check-in notification: ${error}`); - // Don't fail the check-in if notification fails - } } @Get(":id/extra-credit/classes")