Skip to content

Commit

Permalink
fix: GET /menu 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
You-Hyuk committed Aug 16, 2024
1 parent b498d15 commit 21031e1
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,13 @@ public List<Menu> findMenuInPlaceByUserId(Long userId){
log.info(places.toString());

for (Place place : places) {
Menu menu = menuRepository.findDistinctByUserIdOrderByCreatedAtDesc(
place.getId(),
userId
).orElseThrow(() -> new MenuNotFoundException());
menuList.add(menu);
if(place.getMenus() != null && !place.getMenus().isEmpty()) {
Menu menu = menuRepository.findDistinctByUserIdOrderByCreatedAtDesc(
place.getId(),
userId
).orElseThrow(() -> new MenuNotFoundException());
menuList.add(menu);
}
}

log.info(menuList.toString());
Expand Down

0 comments on commit 21031e1

Please sign in to comment.