Skip to content

Commit

Permalink
feat : 휴대전화 번호 저장 로직 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
GaBaljaintheroom committed Jan 20, 2024
1 parent 32beb41 commit 19a62c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import site.timecapsulearchive.core.infra.sms.dto.SmsApiResponse;

@Service
@Transactional
@RequiredArgsConstructor
public class MessageVerificationService {

Expand Down Expand Up @@ -42,6 +43,8 @@ public VerificationMessageSendResponse sendVerificationMessage(

final SmsApiResponse apiResponse = smsApiService.sendMessage(receiver, message);

Member findMember = memberService.findMemberByMemberId(memberId);
findMember.updatePhoneNumber(receiver);
messageAuthenticationCacheRepository.save(memberId, code);

return VerificationMessageSendResponse.success(apiResponse.resultCode(),
Expand All @@ -63,7 +66,6 @@ private String generateMessage(final String code, final String appHashKey) {
+ appHashKey;
}

@Transactional
public MemberRandomNicknameResponse getRandomNickname(
final Long memberId,
final Integer certificationNumber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,9 @@ private Member(String profileUrl, SocialType socialType, String email, String au
public void updateVerification() {
this.isVerified = true;
}

public void updatePhoneNumber(String phone) {
this.phone = phone;
}

}

0 comments on commit 19a62c3

Please sign in to comment.