Skip to content

Commit

Permalink
๐Ÿ”ง ์ตœ์ดˆ ํšŒ์›์ธ๊ฒฝ์šฐ DB์— ๋ฐ์ดํ„ฐ์ €์žฅ
Browse files Browse the repository at this point in the history
  • Loading branch information
youngreal committed Nov 20, 2024
1 parent 9468aa1 commit 8ce23b9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.dnd.dndtravel.auth.service.MemberNameGenerator;
import com.dnd.dndtravel.map.repository.WithdrawMemberRepository;
import com.dnd.dndtravel.member.domain.Member;
import com.dnd.dndtravel.member.domain.WithdrawMember;
import com.dnd.dndtravel.member.repository.MemberRepository;
import com.dnd.dndtravel.member.service.response.MyPageResponse;

Expand Down Expand Up @@ -47,6 +48,9 @@ public Member saveMember(String email, String sub, String selectedColor) {
log.info("sub = {}", sub);
validateNewMemberEmail(email, sub);
String targetEmail = determineEmail(email, sub);
if (targetEmail.equals(email)) {
withDrawMemberRepository.save(WithdrawMember.of(sub, email));
}
return memberRepository.save(
Member.of(
memberNameGenerator.generateRandomName(),
Expand Down

0 comments on commit 8ce23b9

Please sign in to comment.