-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat(*): 결과 제출 API 구현 #59
Conversation
Member member = memberRepository.findById(memberId) | ||
.orElseThrow(() -> new MemberBusinessException(MemberErrorCode.MEMBER_NOT_FOUND)); | ||
|
||
Certificate certificate = certificateRepository.findById(request.certificateId()) | ||
.orElseThrow(() -> new CertificateBusinessException(CertificateErrorCode.CERTIFICATE_NOT_FOUND)); |
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.
getReferenceById를 안쓰고 여기선 find를 쓰네 #9 여기서 말한 거랑 다른듯?
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.
수정해서 올릴게
List<ProblemSolving> problemSolvings = new ArrayList<>(); | ||
for (int i = 0; i < solvedProblems.size(); i++) { | ||
boolean isCorrect = solvedProblems.get(i).checkAnswer(request.problems().get(i).choice()); | ||
ProblemSolving problemSolving = ProblemSolving.of(member, solvedProblems.get(i), learning, request.problems().get(i).choice(), isCorrect); | ||
problemSolvings.add(problemSolving); | ||
} |
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.
다른 두 리스트를 인덱스로 처리해야 한다고 생각했는데 수정해야 함 수정해서 올릴게
Long learningTime, | ||
LearningMode learningMode, | ||
ProblemResultRequest problems |
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.
LearningMode 맵핑이 안되면 어떤 예외가 발생하는지? Controller에 대한 테스트코드가 없네 해당 DTO 테스트 코드도 없고
내가 전에 OAuth 할떄 Enum값에 대한 예외 처리를 위해 @EnumValid
만들었는데 이거 써도 될듯?
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.
수정해서 올렸으
PR 변경된 내용
Learning, ProblemSolving Entity 구현
결과 제출 API 구현
추가 내용
참조
Closes #58