Skip to content

Commit

Permalink
[BE] fix: 선택하지 않은 체크박스는 응답하지 않도록 수정 (#729)
Browse files Browse the repository at this point in the history
  • Loading branch information
donghoony authored Sep 26, 2024
1 parent 130fd8a commit 031c0f8
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,8 @@ private QuestionAnswerResponse mapToCheckboxQuestionResponse(Review review,
Set<Long> selectedOptionIds = review.getAllCheckBoxOptionIds();

List<OptionItemAnswerResponse> optionItemResponse = optionItems.stream()
.map(optionItem -> new OptionItemAnswerResponse(
optionItem.getId(),
optionItem.getContent(),
selectedOptionIds.contains(optionItem.getId()))
)
.filter(optionItem -> selectedOptionIds.contains(optionItem.getId()))
.map(optionItem -> new OptionItemAnswerResponse(optionItem.getId(), optionItem.getContent(), true))
.toList();

OptionGroupAnswerResponse optionGroupAnswerResponse = new OptionGroupAnswerResponse(
Expand Down

0 comments on commit 031c0f8

Please sign in to comment.