Skip to content

Commit

Permalink
Merge pull request #37 from Nexters/refactor/use-findById
Browse files Browse the repository at this point in the history
[REFACTOR] findById 적용 및 NOTFOUND 핸들링 구현 (#36)
  • Loading branch information
delphox60 authored Jul 25, 2023
2 parents 38dd19c + 213f626 commit b5c820f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public List<HintDto.HintListResponse> getHintList(Long themeId) {
}

public Object getHintListByThemeId(Long themeId) {
Theme theme = themeRepository.getReferenceById(themeId);
Theme theme = themeRepository.findById(themeId).orElseThrow(() -> new CustomException(TARGET_THEME_NOT_FOUND));

return theme.getHints().stream().map(Hint::toHintListResponse).toList();
}
Expand Down

0 comments on commit b5c820f

Please sign in to comment.