-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: status로 필터링 시 발생하는 500 오류 해결 #131
The head ref may contain hidden characters: "fix/#130-\uD589\uC0AC_\uBAA9\uB85D_\uC870\uD68C\uC5D0\uC11C_Status_\uD544\uD130\uB9C1_\uC2DC_\uC5D0\uB7EC_\uBC1C\uC0DD"
fix: status로 필터링 시 발생하는 500 오류 해결 #131
Conversation
- null 체크해서 해결 #130
if (cannotFoundKeyStatus(filteredEvents)) { | ||
return List.of(); | ||
} | ||
return EventResponse.makeEventResponsesByStatus(status, filteredEvents); |
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.
이러한 null 체크해서 빈 리스트를 반환하는 로직이 생겨났으니 테스트도 추가해보는 것이 어떨까요?
기존에 테스트 코드를 많이 작성하셨음에도 불구하고 |
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.
수고하셨습니다.
@@ -148,12 +147,19 @@ private List<EventResponse> filterEventResponsesByStatus(final String statusName | |||
final EnumMap<EventStatus, List<Event>> sortAndGroupByEventStatus) { | |||
if (isExistStatusName(statusName)) { | |||
EventStatus status = EventStatus.from(statusName); | |||
return EventResponse.makeEventResponsesByStatus(status, | |||
sortAndGroupByEventStatus.get(status)); | |||
List<Event> filteredEvents = sortAndGroupByEventStatus.get(status); |
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.
sortAndGroupByEventStatus
라는게 저는 메서드 명처럼 느껴지는데 아마란스는 어떻게 생각하시나요?
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.
듣고 보니 그렇게 보이네요...! eventsForEventStatus로 변경했습니다😀
- sortAndGroupByStatus을 eventsForEventStatus로 변경 #130
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할게요
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.
고생하셨습니다 !!
#️⃣연관된 이슈
#130
📝작업 내용
예상 소요 시간 및 실제 소요 시간
급하게 작업하느라 측정하지 않았습니다...죄송합니다