From 95ecdacb8303cebf9bc28195c451a132cf705500 Mon Sep 17 00:00:00 2001 From: YangGwangSeong Date: Fri, 6 Dec 2024 12:54:17 +0900 Subject: [PATCH] =?UTF-8?q?:sparkles:=20feat:=20auth=20=EC=93=B8=EB=8D=B0?= =?UTF-8?q?=20=EC=97=86=EB=8A=94=20async=20await=20=ED=82=A4=EC=9B=8C?= =?UTF-8?q?=EB=93=9C=20=EC=A0=9C=EA=B1=B0=20(#17)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/auth.controller.ts | 14 +++++++------- src/services/auth.service.ts | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/controllers/auth.controller.ts b/src/controllers/auth.controller.ts index fdca72b..d906713 100644 --- a/src/controllers/auth.controller.ts +++ b/src/controllers/auth.controller.ts @@ -16,29 +16,29 @@ export class AuthController { @IsPublicDecorator(IsPublicEnum.PUBLIC) @UseGuards(BasicTokenGuard) @Post("sign-in") - async signIn(@Headers("authorization") rawToken: string) { + signIn(@Headers("authorization") rawToken: string) { const token = this.authService.extractTokenFromHeader(rawToken, false); const decoded = this.authService.decodeBasicToken(token); - return await this.authService.signInByEmail(decoded); + return this.authService.signInByEmail(decoded); } @IsPublicDecorator(IsPublicEnum.PUBLIC) @Post("sign-up") - async signUp(@Body() dto: RegisterMemberDto) { - return await this.authService.registerByEmail(dto); + signUp(@Body() dto: RegisterMemberDto) { + return this.authService.registerByEmail(dto); } @Post("sign-out") signOut(@CurrentMemberDecorator("id") memberId: number) { - void this.authService.updateRefreshToken(memberId); + return this.authService.updateRefreshToken(memberId); } @IsPublicDecorator(IsPublicEnum.PUBLIC) @Post("verify-email") - async verifyEmail(@Body() dto: VerifyEmailDto) { - return await this.authService.verifyEmail(dto); + verifyEmail(@Body() dto: VerifyEmailDto) { + return this.authService.verifyEmail(dto); } @IsPublicDecorator(IsPublicEnum.REFRESH) diff --git a/src/services/auth.service.ts b/src/services/auth.service.ts index 96514cf..66e8e8c 100644 --- a/src/services/auth.service.ts +++ b/src/services/auth.service.ts @@ -98,7 +98,7 @@ export class AuthService { verificationCode, ); - void this.mailsService.sendVerificationEmail( + await this.mailsService.sendVerificationEmail( newMember.email, verificationCode, );