Skip to content

Commit 8a08dcc

Browse files
committed
[FIX] 카카오 로그인 응답값 수정
1 parent 2f9b520 commit 8a08dcc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/org/routineade/RoutineAdeServer/controller/UserController.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,16 @@ public ResponseEntity<Map<String, String>> login(@RequestBody String userId) {
6868

6969
@Operation(summary = "카카오 로그인", description = "카카오 로그인 API", hidden = true)
7070
@GetMapping("/login/kakao")
71-
public ResponseEntity<Void> kakaoLogin(@RequestParam("code") String code) throws URISyntaxException {
71+
public ResponseEntity<String> kakaoLogin(@RequestParam("code") String code) throws URISyntaxException {
7272
HttpHeaders httpHeaders = new HttpHeaders();
73+
String token = kakaoService.login(code);
7374
httpHeaders.setLocation(
74-
new URI("http://15.164.88.94/users/login/kakao?token=" + kakaoService.login(code)));
75+
new URI("http://15.164.88.94/users/login/kakao?token=" + token));
7576

7677
return ResponseEntity
7778
.status(FOUND)
7879
.headers(httpHeaders)
79-
.build();
80+
.body(token);
8081
}
8182

8283
@Operation(summary = "유저 기본 정보 등록", description = "사용자가 첫 가입 시 기본 정보를 등록하는 API")

0 commit comments

Comments
 (0)