Skip to content

Commit

Permalink
fix: 예약 가능 공간 조회 시, 과거 시간 검증 하도록 수정 (#939)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakjung authored Mar 12, 2023
1 parent 3942978 commit 4e20e81
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ public SpaceFindAllAvailabilityResponse findAllSpaceAvailability(
List<Space> allSpaces = map.getSpaces();

Set<Long> spaceIds = allSpaces.stream().map(Space::getId).collect(Collectors.toSet());
ReservationTime reservationTime = ReservationTime.ofDefaultServiceZone(startDateTime, endDateTime);
ReservationTime reservationTime = ReservationTime.of(
startDateTime,
endDateTime,
map.getServiceZone(),
false);
List<Reservation> allReservations = reservations.findAllBySpaceIdInAndReservationTimeDate(spaceIds, reservationTime.getDate());

Set<Space> unavailableSpaces = allReservations.stream()
Expand Down

0 comments on commit 4e20e81

Please sign in to comment.