From 7916ed635374008004bae4d1765ddad4e3f51c93 Mon Sep 17 00:00:00 2001 From: CHAE Date: Mon, 6 Nov 2023 23:08:30 +0900 Subject: [PATCH 1/2] =?UTF-8?q?:ambulance:=20Fix:=20=EC=B9=B4=EC=B9=B4?= =?UTF-8?q?=EC=98=A4=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=9D=91=EB=8B=B5=20Dto?= =?UTF-8?q?=20=EB=AF=B8=EC=8A=A4=EB=A7=A4=EC=B9=AD=20=EC=83=81=ED=99=A9=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20(#51)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/diareat/diareat/auth/dto/KakaoAccount.java | 2 ++ .../com/diareat/diareat/auth/dto/KakaoProfile.java | 6 +++--- .../com/diareat/diareat/auth/dto/KakaoProperties.java | 11 +++++++++++ .../diareat/auth/dto/KakaoUserInfoResponse.java | 5 +++-- 4 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 src/main/java/com/diareat/diareat/auth/dto/KakaoProperties.java 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; } From 291ee2c9495e58a3dab04525f617edb0dbf14ad3 Mon Sep 17 00:00:00 2001 From: CHAE Date: Mon, 6 Nov 2023 23:09:32 +0900 Subject: [PATCH 2/2] =?UTF-8?q?:ambulance:=20Fix:=20KakaoAuthService=20Dto?= =?UTF-8?q?=20getter=20=ED=91=9C=ED=98=84=20=EC=88=98=EC=A0=95=20(#51)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/diareat/diareat/auth/service/KakaoAuthService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); } }