-
Notifications
You must be signed in to change notification settings - Fork 6
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
refactor-be: 지원서 제출 시 응답 존재 유무 검증 추가 #556
Conversation
1724144221.731569 |
📌 Test Coverage Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코멘트 확인 부탁드려요~
if (replies.isEmpty()) { | ||
throw new ReplyNotExistsException(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
모든 질문에 응답하지 않은 경우에만 예외를 던지는 것 맞나요?
ReplyNotExistsException의 MESSAGE("응답하지 않은 질문이 존재합니다.")만 보면,
질문 중 일부에 응답하지 않은 경우도 포함되는 것 같아요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
질문 중 하나라도 응답하지 않는 경우 예외가 발생하도록 했는데, 필수 질문 중 하나라도 응답하지 않는 경우 예외가 발생하도록 수정해야겠네요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
방금 남긴 부분만 변경하시면 좋을 것 같습니다 ~
@@ -22,7 +22,7 @@ public class AnswerService { | |||
@Transactional | |||
public void saveAnswerReplies(AnswerCreateRequest answerCreateRequest, Question question, Applicant applicant) { | |||
List<String> replies = answerCreateRequest.replies(); | |||
if (replies.isEmpty()) { | |||
if (question.getRequired() && replies.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question에 isRequired()를 만들 수 있을 것 같아요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
primitive type으로 변경하면서 사라졌습니당
Original issue description
목적
작업 세부사항
참고 사항
VAL_ANS_RES_01
closes #555