From d4701fe3101ea5d18904304fe640e58a6b136cad Mon Sep 17 00:00:00 2001 From: suhoon Date: Sat, 6 Jan 2024 22:00:55 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EC=9B=B9=EB=A9=94=EC=9D=BC=20=EC=9D=B8?= =?UTF-8?q?=EC=A6=9D=20=EC=9E=AC=EC=A0=84=EC=86=A1=20=EC=9D=B4=EC=8A=88=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/umc/StudyFlexBE/controller/MemberController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/umc/StudyFlexBE/controller/MemberController.java b/src/main/java/com/umc/StudyFlexBE/controller/MemberController.java index 06f1cce..78fa526 100644 --- a/src/main/java/com/umc/StudyFlexBE/controller/MemberController.java +++ b/src/main/java/com/umc/StudyFlexBE/controller/MemberController.java @@ -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 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(BaseResponseStatus.SUCCESS, "인증 코드 발송 완료."); } catch (Exception e) { return new BaseResponse<>(BaseResponseStatus.SEND_EMAIL_FAILED);