diff --git a/src/main/java/com/diareat/diareat/auth/dto/KakaoAccount.java b/src/main/java/com/diareat/diareat/auth/dto/KakaoAccount.java index faf7a48..3f0a804 100644 --- a/src/main/java/com/diareat/diareat/auth/dto/KakaoAccount.java +++ b/src/main/java/com/diareat/diareat/auth/dto/KakaoAccount.java @@ -5,5 +5,7 @@ @Getter public class KakaoAccount { + private Boolean profile_nickname_needs_agreement; + private Boolean profile_image_needs_agreement; private KakaoProfile profile; } diff --git a/src/main/java/com/diareat/diareat/auth/dto/KakaoProfile.java b/src/main/java/com/diareat/diareat/auth/dto/KakaoProfile.java index 1c50d73..ea6e2c8 100644 --- a/src/main/java/com/diareat/diareat/auth/dto/KakaoProfile.java +++ b/src/main/java/com/diareat/diareat/auth/dto/KakaoProfile.java @@ -6,7 +6,7 @@ public class KakaoProfile { private String nickname; - private String profileImageUrl; - private String thumbnailImageUrl; - private boolean isDefaultImage; + private String thumbnail_image_url; + private String profile_image_url; + private Boolean is_default_image; } diff --git a/src/main/java/com/diareat/diareat/auth/dto/KakaoProperties.java b/src/main/java/com/diareat/diareat/auth/dto/KakaoProperties.java new file mode 100644 index 0000000..4b11027 --- /dev/null +++ b/src/main/java/com/diareat/diareat/auth/dto/KakaoProperties.java @@ -0,0 +1,11 @@ +package com.diareat.diareat.auth.dto; + +import lombok.Getter; + +@Getter +public class KakaoProperties { + + private String nickname; + private String profile_image; + private String thumbnail_image; +} diff --git a/src/main/java/com/diareat/diareat/auth/dto/KakaoUserInfoResponse.java b/src/main/java/com/diareat/diareat/auth/dto/KakaoUserInfoResponse.java index a4e4adb..039c62b 100644 --- a/src/main/java/com/diareat/diareat/auth/dto/KakaoUserInfoResponse.java +++ b/src/main/java/com/diareat/diareat/auth/dto/KakaoUserInfoResponse.java @@ -6,6 +6,7 @@ public class KakaoUserInfoResponse { private Long id; - private boolean hasSignedUp; - private KakaoAccount kakaoAccount; + private String connected_at; + private KakaoProperties properties; + private KakaoAccount kakao_account; } diff --git a/src/main/java/com/diareat/diareat/auth/service/KakaoAuthService.java b/src/main/java/com/diareat/diareat/auth/service/KakaoAuthService.java index c5ce759..fa171d3 100644 --- a/src/main/java/com/diareat/diareat/auth/service/KakaoAuthService.java +++ b/src/main/java/com/diareat/diareat/auth/service/KakaoAuthService.java @@ -29,7 +29,7 @@ public Long isSignedUp(String token) { // 클라이언트가 보낸 token을 이 @Transactional(readOnly = true) public CreateUserDto createUserDto(JoinUserDto joinUserDto) { // 카카오로부터 프사 URL, 유저 고유ID를 얻어온 후, 이를 유저가 입력한 정보와 함께 CreateUserDto로 반환 KakaoUserInfoResponse userInfo = kakaoUserInfo.getUserInfo(joinUserDto.getToken()); - return CreateUserDto.of(joinUserDto.getNickName(), userInfo.getKakaoAccount().getProfile().getProfileImageUrl(), + return CreateUserDto.of(joinUserDto.getNickName(), userInfo.getKakao_account().getProfile().getProfile_image_url(), userInfo.getId().toString(), joinUserDto.getGender(), joinUserDto.getHeight(), joinUserDto.getWeight(), joinUserDto.getAge()); } }