Skip to content

Commit

Permalink
Fix: 웹메일 인증 재전송 이슈 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
s2hoon committed Jan 6, 2024
1 parent 8ee3b4b commit d4701fe
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,15 @@ public BaseResponse<?> kakaoCallback(String code) {
@PostMapping("/sendAuthCode")
public BaseResponse<?> senAuthCode(@RequestBody SendAuthCodeDto sendAuthCodeDto) {
try {
UnivCert.clear(mail_api_key,sendAuthCodeDto.getEmail());
Map<String, Object> result = UnivCert.certify(mail_api_key, sendAuthCodeDto.getEmail(),
sendAuthCodeDto.getUnivName(), false);
if (result.isEmpty()) {
return new BaseResponse<>(BaseResponseStatus.SEND_EMAIL_FAILED);
}
if (result.get("success").equals(false)) {
return new BaseResponse<>(BaseResponseStatus.WEB_MAIL_CODE_FAILED);
}
return new BaseResponse<String>(BaseResponseStatus.SUCCESS, "인증 코드 발송 완료.");
} catch (Exception e) {
return new BaseResponse<>(BaseResponseStatus.SEND_EMAIL_FAILED);
Expand Down

0 comments on commit d4701fe

Please sign in to comment.