Skip to content

Commit

Permalink
Feat : userid 도 같이 반환
Browse files Browse the repository at this point in the history
  • Loading branch information
namewhat99 committed Apr 17, 2024
1 parent cb9beb3 commit c2ee116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -148,7 +149,6 @@ export class AuthService {
}
}


public async checkNicknameDuplicate(nickname: string) {
const isExist = await this.userService.checkNicknameDuplicate(nickname);

Expand Down

0 comments on commit c2ee116

Please sign in to comment.