Skip to content

Commit

Permalink
refactor: (#829) 메서드 순서 변경 및 메서드명, 오타 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jeomxon committed Nov 6, 2023
1 parent b43cd76 commit 193b461
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public ResponseEntity<Void> logout(
return ResponseEntity.noContent().build();
}

@DeleteMapping("/member/delete")
public ResponseEntity<Void> disconnectFromKakao(@Auth final Member loginMember) {
@DeleteMapping("/members/me/delete")
public ResponseEntity<Void> deleteMember(@Auth final Member loginMember) {
authService.deleteMember(loginMember);
return ResponseEntity.noContent().build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ResponseEntity<ReissuedAccessTokenResponse> reissueAccessToken(
);

@Operation(summary = "회원 탈퇴 하기", description = "회원 탈퇴를 한다.")
@ApiResponse(responseCode = "200", description = "회원 탈퇴 성공")
ResponseEntity<Void> disconnectFromKakao(final Member loginMember);
@ApiResponse(responseCode = "204", description = "회원 탈퇴 성공")
ResponseEntity<Void> deleteMember(final Member loginMember);

}
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public void deleteRefreshToken(final String refreshTokenByRequest) {

@Transactional
public void deleteMember(final Member member) {
memberService.deleteMember(member);
kakaoOAuthClient.disconnectFromKakao(member);
memberService.deleteMember(member);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public KakaoOAuthClient(
}

public String getAccessToken(final String code) {
final MultiValueMap<String, String> loginInfoRequest = makeKakaoInfo(code);
final MultiValueMap<String, String> loginInfoRequest = makeKakaoLoginInfo(code);
final HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);

Expand All @@ -48,7 +48,7 @@ public String getAccessToken(final String code) {
return response.accessToken();
}

private MultiValueMap<String, String> makeKakaoInfo(final String code) {
private MultiValueMap<String, String> makeKakaoLoginInfo(final String code) {
final MultiValueMap<String, String> loginInfoRequest = new LinkedMultiValueMap<>();
loginInfoRequest.add("grant_type", kakaoOAuthLoginInfo.grantType());
loginInfoRequest.add("client_id", kakaoOAuthLoginInfo.clientId());
Expand Down

0 comments on commit 193b461

Please sign in to comment.