From 569a5ab474adae4ca856127518f922a1116c4c50 Mon Sep 17 00:00:00 2001 From: Seokyeong Date: Tue, 20 Feb 2024 17:45:21 +0900 Subject: [PATCH] fix: kakao withdraw --- .../fullcar/member/application/auth/KakaoAuthService.java | 6 +++--- src/main/java/com/fullcar/member/domain/auth/SocialId.java | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/fullcar/member/application/auth/KakaoAuthService.java b/src/main/java/com/fullcar/member/application/auth/KakaoAuthService.java index 4948be9..8c26f29 100644 --- a/src/main/java/com/fullcar/member/application/auth/KakaoAuthService.java +++ b/src/main/java/com/fullcar/member/application/auth/KakaoAuthService.java @@ -98,11 +98,11 @@ public void revoke(Member member) { headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); headers.set("Authorization", "KakaoAK " + adminKey); - MultiValueMap map = new LinkedMultiValueMap<>(); + MultiValueMap map = new LinkedMultiValueMap<>(); map.add("target_id_type", "user_id"); - map.add("target_id", member.getSocialId().toString()); + map.add("target_id", Long.valueOf(member.getSocialId().getSocialId())); - HttpEntity> request = new HttpEntity<>(map, headers); + HttpEntity> request = new HttpEntity<>(map, headers); try { restTemplate.exchange( diff --git a/src/main/java/com/fullcar/member/domain/auth/SocialId.java b/src/main/java/com/fullcar/member/domain/auth/SocialId.java index b59daed..32df960 100644 --- a/src/main/java/com/fullcar/member/domain/auth/SocialId.java +++ b/src/main/java/com/fullcar/member/domain/auth/SocialId.java @@ -3,12 +3,14 @@ import jakarta.persistence.Column; import jakarta.persistence.Embeddable; import lombok.AllArgsConstructor; +import lombok.Getter; import lombok.NoArgsConstructor; import static lombok.AccessLevel.PROTECTED; @Embeddable +@Getter @NoArgsConstructor(access = PROTECTED) @AllArgsConstructor public class SocialId {