diff --git a/src/main/java/net/teumteum/meeting/controller/MeetingController.java b/src/main/java/net/teumteum/meeting/controller/MeetingController.java index 27410d4..d36a633 100644 --- a/src/main/java/net/teumteum/meeting/controller/MeetingController.java +++ b/src/main/java/net/teumteum/meeting/controller/MeetingController.java @@ -58,7 +58,7 @@ public MeetingResponse getMeetingById(@PathVariable("meetingId") Long meetingId) @ResponseStatus(HttpStatus.OK) public PageDto getMeetingsByCondition( Pageable pageable, - @RequestParam(value = "isOpen") boolean isOpen, + @RequestParam(value = "isOpen", required = false) Boolean isOpen, @RequestParam(value = "topic", required = false) Topic topic, @RequestParam(value = "meetingAreaStreet", required = false) String meetingAreaStreet, @RequestParam(value = "participantUserId", required = false) Long participantUserId, diff --git a/src/main/java/net/teumteum/meeting/service/MeetingService.java b/src/main/java/net/teumteum/meeting/service/MeetingService.java index d87db10..2657f43 100644 --- a/src/main/java/net/teumteum/meeting/service/MeetingService.java +++ b/src/main/java/net/teumteum/meeting/service/MeetingService.java @@ -95,7 +95,7 @@ public void deleteMeeting(Long meetingId, Long userId) { @Transactional(readOnly = true) public PageDto getMeetingsBySpecification(Pageable pageable, Topic topic, String meetingAreaStreet, - Long participantUserId, String searchWord, Boolean isBookmarked, boolean isOpen, Long userId) { + Long participantUserId, String searchWord, Boolean isBookmarked, Boolean isOpen, Long userId) { Specification spec = MeetingSpecification.withIsOpen(isOpen); @@ -110,7 +110,7 @@ public PageDto getMeetingsBySpecification(Pageable pageable, T .or(MeetingSpecification.withSearchWordInIntroduction(searchWord)) .and(MeetingSpecification.withIsOpen(isOpen)); } else if (Boolean.TRUE.equals(isBookmarked)) { - spec = spec.and(MeetingSpecification.withBookmarkedUserId(userId)); + spec = MeetingSpecification.withBookmarkedUserId(userId); } var meetings = meetingRepository.findAll(spec, pageable);