Skip to content

Commit

Permalink
[fix] response 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hysong4u committed Apr 18, 2024
1 parent 62f2c5c commit 5869f49
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ ResponseEntity<SuccessResponse<?>> googleLogin(@RequestParam (name = "code") Str
String nickname = user.getNickname();
if (nickname == null) {
nickname = userService.generateNickname();
LoginResponseDto response = new LoginResponseDto(accessToken, nickname,true);
return SuccessResponse.ok(response);
}
else {
LoginResponseDto response = new LoginResponseDto(accessToken, nickname,false);
return SuccessResponse.ok(response);
}

LoginResponseDto response = new LoginResponseDto(accessToken, nickname);
return SuccessResponse.ok(response);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

public record LoginResponseDto(
String accessToken,
String nickname
String nickname,
Boolean isNew
) {
}

0 comments on commit 5869f49

Please sign in to comment.