diff --git a/src/main/java/com/example/pladialmserver/booking/service/CarBookingService.java b/src/main/java/com/example/pladialmserver/booking/service/CarBookingService.java index e4894ecf..a714ab16 100644 --- a/src/main/java/com/example/pladialmserver/booking/service/CarBookingService.java +++ b/src/main/java/com/example/pladialmserver/booking/service/CarBookingService.java @@ -93,7 +93,7 @@ public void rejectProductBooking(User user, Long carBookingId) { emailUtil.createBookingData(SendEmailReq.toDto(carBooking, REJECT_BOOKING_TEXT)), BOOKING_TEMPLATE); // 차랑 예약 반려 알림 try { - notificationService.sendNotification(carBooking.getCar().getName(), Constants.NotificationCategory.CAR, Constants.Notification.BODY_DENIED, user); + notificationService.sendNotification(carBooking.getCar().getName(), Constants.NotificationCategory.CAR, Constants.Notification.BODY_DENIED, carBooking.getUser()); } catch (IOException e) { e.printStackTrace(); } @@ -148,7 +148,7 @@ private void sendReturnNotification(User user, CarBooking carBooking) { emailUtil.createBookingData(SendEmailReq.toDto(carBooking, RETURN_BOOKING_TEXT)), BOOKING_TEMPLATE); // 차랑 예약 반납 알림 try { - notificationService.sendNotification(carBooking.getCar().getName(), Constants.NotificationCategory.CAR, Constants.Notification.BODY_RETURNED, user); + notificationService.sendNotification(carBooking.getCar().getName(), Constants.NotificationCategory.CAR, Constants.Notification.BODY_RETURNED, carBooking.getCar().getUser()); } catch (IOException e) { e.printStackTrace(); } @@ -202,7 +202,7 @@ public void cancelBookingProduct(User user, Long carBookingId) { // 차량 예약 취소 알림 try { - notificationService.sendNotification(carBooking.getCar().getName(), Constants.NotificationCategory.CAR, Constants.Notification.BODY_CANCELED, user); + notificationService.sendNotification(carBooking.getCar().getName(), Constants.NotificationCategory.CAR, Constants.Notification.BODY_CANCELED, carBooking.getCar().getUser()); } catch (IOException e) { e.printStackTrace(); }