diff --git a/src/main/java/com/example/comma/domain/user/controller/OauthController.java b/src/main/java/com/example/comma/domain/user/controller/OauthController.java index 487bdfa..b1f4c88 100644 --- a/src/main/java/com/example/comma/domain/user/controller/OauthController.java +++ b/src/main/java/com/example/comma/domain/user/controller/OauthController.java @@ -34,10 +34,13 @@ ResponseEntity> 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); } diff --git a/src/main/java/com/example/comma/domain/user/dto/response/LoginResponseDto.java b/src/main/java/com/example/comma/domain/user/dto/response/LoginResponseDto.java index b108b06..478695a 100644 --- a/src/main/java/com/example/comma/domain/user/dto/response/LoginResponseDto.java +++ b/src/main/java/com/example/comma/domain/user/dto/response/LoginResponseDto.java @@ -2,6 +2,7 @@ public record LoginResponseDto( String accessToken, - String nickname + String nickname, + Boolean isNew ) { }