Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/#235 member 수정 #236

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading