-
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
작성한 체크리스트를 조회하는 API를 구현한다. #101
Conversation
Co-Authored-By: tkdgur0906 <[email protected]>
Co-Authored-By: tkdgur0906 <[email protected]>
Co-Authored-By: tkdgur0906 <[email protected]>
Co-Authored-By: tkdgur0906 <[email protected]>
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.
�approve하겠습니다~ 리팩토링하고나서 더 자세히 코드리뷰 남길게요!
@@ -21,6 +21,7 @@ public ResponseEntity<ExceptionResponse> handleBangggoodException(BangggoodExcep | |||
.body(response); | |||
} | |||
|
|||
//TODO 로깅해야함 |
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.
runtimeException.printStackTrace(); 처리해두었습니다.
3차 데모데이 미션이 로깅프레임워크 적용이라 그때 다시 얘기해보면 좋을 것 같아요.
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.
시간 관계상 Approve 할게요~
//TODO 테스트해야 함 | ||
public boolean isQuestionIn(int questionId) { | ||
return this.id == findIdByQuestionId(questionId); | ||
} | ||
|
||
private int findIdByQuestionId(int questionId) { | ||
return Arrays.stream(Category.values()) | ||
.filter(category -> category.questionIds.contains(questionId)) | ||
.mapToInt(category -> category.id) | ||
.findFirst() | ||
.orElseThrow(() -> new BangggoodException(ExceptionCode.INVALID_QUESTION)); | ||
|
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.
.anyMatch()로 대체할 수 있지 않을까요?
❗ Issue
✨ 구현한 기능
📢 논의하고 싶은 내용
🎸 기타