Skip to content

Commit

Permalink
[Fix] 챕터 단 건 조회 해결 상태 조건 불일치 문제 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
NARUBROWN committed Nov 29, 2024
1 parent e828a95 commit 4aa776a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public record ResponseChapterDto(
Long id,
String name,
boolean isCleared,
List<ResponseFindByChapter> quizzes,
boolean isRewardButtonActive
boolean isRewardButtonActive,
List<ResponseFindByChapter> quizzes
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,14 @@ public ResponseChapterDto getChapter(Long chapter_id, Long user_id) {
buttonActiveState = false;
}

if(foundChapter.getQuizzes().isEmpty()) {
buttonActiveState = false;
}

Map<Long, IsQuizCleared> quizClearedMap = new HashMap<>();

for (IsQuizCleared clearedQuiz : clearedQuizzes) {
quizClearedMap.put(clearedQuiz.getId(), clearedQuiz);
quizClearedMap.put(clearedQuiz.getQuiz().getId(), clearedQuiz);
}

List<ResponseFindByChapter> responseQuizDtoList = new ArrayList<>();
Expand Down

0 comments on commit 4aa776a

Please sign in to comment.