Skip to content

refactor: 인증번호 확인 코드 수정 #28

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

Merged
merged 1 commit into from
Jun 29, 2025

Conversation

okluckyok
Copy link
Collaborator

인증번호 확인 코드 수정

@okluckyok okluckyok requested a review from f-lab-nolan June 17, 2025 13:00
@okluckyok okluckyok self-assigned this Jun 17, 2025
} else {
redisTemplateLong.opsForValue().increment("userValidationCodeFailCnt:" + id);
}
if (failCnt >= 4) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (failCnt >= 4) {
throw new BusinessException(MessageCode.EXCEEDED_MAX_ATTEMPTS);
}
throw new BusinessException(MessageCode.INVALID_VERIFICATION_CODE);

if (!code.equals(redisCode)) {
throw new BusinessException(MessageCode.INVALID_VERIFICATION_CODE);
if (failCnt == null) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (failCnt == null) {
redisTemplateLong.opsForValue().set("userValidationCodeFailCnt:" + id, 1L);
throw new BusinessException(MessageCode.INVALID_VERIFICATION_CODE);
}
redisTemplateLong.opsForValue().increment("userValidationCodeFailCnt:" + id);

@okluckyok okluckyok merged commit e2a4c95 into main Jun 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants