From c2ee1169490c2a88fed9b32fcbb45bfcd03d4cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=80=E1=85=AA=E1=86=BC=E1=84=92?= =?UTF-8?q?=E1=85=AE=E1=86=AB?= Date: Wed, 17 Apr 2024 22:00:18 +0900 Subject: [PATCH] =?UTF-8?q?Feat=20:=20userid=20=EB=8F=84=20=EA=B0=99?= =?UTF-8?q?=EC=9D=B4=20=EB=B0=98=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/auth/auth.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts index 4d57922..0d900d1 100644 --- a/src/auth/auth.service.ts +++ b/src/auth/auth.service.ts @@ -27,13 +27,14 @@ export class AuthService { async logInOrSignUp(providerId: string) { let user = await this.userService.findUserByProviderId(providerId); const isMember = this.isMember(user); + const userId = user.id; if (!user) { user = await this.userService.createUser(providerId); await this.totalService.createTotalPoint(user.userId); } const accessToken = this.generateAccessToken(user.userId); const refreshToken = this.generateRefreshToken(user.userId); - return { accessToken, refreshToken, isMember }; + return { accessToken, refreshToken, isMember, userId }; } isMember(user: User) { @@ -148,7 +149,6 @@ export class AuthService { } } - public async checkNicknameDuplicate(nickname: string) { const isExist = await this.userService.checkNicknameDuplicate(nickname);