From 74bd125a0a65549a9e534830eea170b772f1d5cc Mon Sep 17 00:00:00 2001 From: hysong4u Date: Thu, 11 Jan 2024 20:23:07 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20API=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/controller/OAuthController.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/sopt/sweet/domain/member/controller/OAuthController.java b/src/main/java/org/sopt/sweet/domain/member/controller/OAuthController.java index cdc00a4..85786d0 100644 --- a/src/main/java/org/sopt/sweet/domain/member/controller/OAuthController.java +++ b/src/main/java/org/sopt/sweet/domain/member/controller/OAuthController.java @@ -20,15 +20,13 @@ public class OAuthController implements OAuthApi { @PostMapping("/kakao/login") public ResponseEntity> kakaoLogin(@RequestParam("code") String code) { - //KakaoUserInfoResponseDto userInfo = oAuthService.kakaoCallback(code); - //MemberTokenResponseDto memberToken = oAuthService.saveToken(userInfo.socialId()); - - //Map loginResponse = new HashMap<>(); - //loginResponse.put("userInfo", userInfo); - //loginResponse.put("memberToken", memberToken); - //return SuccessResponse.ok(loginResponse); - String response = "code"+code; - return SuccessResponse.ok(response); + KakaoUserInfoResponseDto userInfo = oAuthService.kakaoCallback(code); + MemberTokenResponseDto memberToken = oAuthService.saveToken(userInfo.memberId()); + + Map loginResponse = new HashMap<>(); + loginResponse.put("userInfo", userInfo); + loginResponse.put("memberToken", memberToken); + return SuccessResponse.ok(loginResponse); }