Skip to content

Commit

Permalink
fix/#235 member 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yeon015 committed Oct 3, 2024
1 parent 43e98b7 commit 6b05948
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public ApiResponse kakaoWithdraw(@AuthenticationPrincipal Member member, @Reques
// 애플 탈퇴
@DeleteMapping("/withdraw/apple")
public ApiResponse withdraw(@AuthenticationPrincipal Member member,
@Nullable@RequestHeader("X-Apple-Code") final String code, @RequestBody @Validated WithdrawReasonRequestDto withdrawReasonReqDto){
@Nullable@RequestHeader("X-Apple-Code") final String code, @RequestBody WithdrawReasonRequestDto withdrawReasonReqDto){
oauthService.appleWithdraw(member, code);

// 탈퇴 사유 추가
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/umc/th/juinjang/model/entity/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public class Member extends BaseEntity implements UserDetails {
private MemberProvider provider;

// apple client id값을 의미
@Column(name = "apple_sub")
@Column(name = "apple_sub", unique = true)
private String appleSub;

// kakao target id값 의미 (카카오의 유저 식별값. 탈퇴할 때 필요)
@Column(name="target_id")
@Column(name="target_id", unique = true)
private Long kakaoTargetId;

@Lob
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public LoginResponseDto kakaoSignUp (Long targetId, KakaoSignUpRequestDto kakaoS
}
} else if (getMember.isPresent() || getTargetId.isPresent()) { // 둘 중 하나만 존재할 때 실행될 코드
throw new MemberHandler(FAILED_TO_LOGIN);
} else { // 두 값 모두 존재하지 않을 때 실행될 코드, 아직 회원가입 하지 않은 회원인 경우
} else if (!getMember.isPresent() && !getTargetId.isPresent()) { // 두 값 모두 존재하지 않을 때 실행될 코드, 아직 회원가입 하지 않은 회원인 경우
member = memberRepository.save(
Member.builder()
.email(email)
Expand Down

0 comments on commit 6b05948

Please sign in to comment.