Skip to content

Commit

Permalink
fix: added rep bypass
Browse files Browse the repository at this point in the history
  • Loading branch information
Sampiiiii committed Apr 24, 2024
1 parent 35eddf3 commit 4a49d94
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion apps/anvil/src/sign-in/sign-in.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class SignInController {
private readonly trainingService: TrainingService,
private readonly signInService: SignInService,
private readonly userService: UsersService,
) {}
) { }

@Get()
@IsRep()
Expand Down Expand Up @@ -50,6 +50,17 @@ export class SignInController {
code: ErrorCodes.not_registered,
});
}

if (await this.signInService.isRep(ucard_number)) {
return {
// reasons,
training: await this.signInService.getTrainings(user.id, location),
...user,
...{ infractions: [] },
};
}


const extras = await this.signInService.preSignInChecks(location, ucard_number);

// const [trainings, reasons] = await Promise.all([
Expand Down

0 comments on commit 4a49d94

Please sign in to comment.