Skip to content

Commit

Permalink
✏️ 진짜 예혁
Browse files Browse the repository at this point in the history
  • Loading branch information
labyrinth30 committed Jun 29, 2024
1 parent e0ff3a2 commit 56624e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ export class AuthService {
return this.usersService.createUser(createUserDto);
}

loginUser(user: Pick<UsersModel, 'email' | 'id'>, res: Response, nickname: string) {
loginUser(user: Pick<UsersModel, 'email' | 'id'>, res: Response) {
const accessToken = this.signToken(user);
console.log('accessToken:', accessToken);
return res.json({ accessToken, nickname });
return res.json({ accessToken });
}

async kakaoLogin(
Expand Down Expand Up @@ -120,10 +120,10 @@ export class AuthService {
// 사용자 정보가 없으면 회원가입
if (!user) {
user = await this.registerUser(email, nickname);
return this.loginUser(user, res, nickname);
return this.loginUser(user, res);
}
// 로그인
return this.loginUser(user, res, nickname);
return this.loginUser(user, res);
} catch (e) {
console.error('Error during Kakao login:', e);
throw new UnauthorizedException('카카오 로그인 중 오류가 발생했습니다.');
Expand Down

0 comments on commit 56624e0

Please sign in to comment.