Skip to content

Commit

Permalink
adding awaits to asunc functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ojn03 committed Sep 21, 2024
1 parent 541a07b commit 9c296e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/backend/src/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class AuthController {
// TODO will be deprecated if we use Google OAuth
@Post('/verify')
async verifyUser(@Body() body: VerifyUserRequestDTO) {
return this.authService
return await this.authService
.verifyUser(body.email, String(body.verificationCode))
.catch((err) => {
throw new BadRequestException(err.message);
Expand All @@ -60,7 +60,7 @@ export class AuthController {
async signin(
@Body() signInDto: SignInRequestDto,
): Promise<SignInResponseDto> {
return this.authService.signin(signInDto).catch((err) => {
return await this.authService.signin(signInDto).catch((err) => {
throw new UnauthorizedException(err.message);
});
}
Expand Down

0 comments on commit 9c296e5

Please sign in to comment.