diff --git a/app/api/show-api/src/main/java/com/example/show/service/ShowService.java b/app/api/show-api/src/main/java/com/example/show/service/ShowService.java index f6c22e79..ae8c9435 100644 --- a/app/api/show-api/src/main/java/com/example/show/service/ShowService.java +++ b/app/api/show-api/src/main/java/com/example/show/service/ShowService.java @@ -151,16 +151,16 @@ public void alertReservation( ticketingAlertReservationRequest.type().toDomainType() ); - var request = ticketingAlertReservationRequest.toDomainRequest( - showTicketingTime.getShow().getTitle(), - showTicketingTime.getTicketingAt() - ); - - if (request.alertTimes().isEmpty()) { + if (showTicketingTime.getTicketingAt().isBefore(LocalDateTime.now())) { throw new BusinessException(ShowError.TICKETING_ALERT_RESERVED_ERROR); } - var domainResponse = ticketingAlertUseCase.alertReservation(request); + var domainResponse = ticketingAlertUseCase.alertReservation( + ticketingAlertReservationRequest.toDomainRequest( + showTicketingTime.getShow().getTitle(), + showTicketingTime.getTicketingAt() + ) + ); messagePublisher.publishTicketingReservation( "ticketingAlert", TicketingAlertsToReserveServiceMessage.from(domainResponse)