diff --git a/src/main/java/org/poolc/api/notification/service/NotificationService.java b/src/main/java/org/poolc/api/notification/service/NotificationService.java index cd1b5df2..f00c2c64 100644 --- a/src/main/java/org/poolc/api/notification/service/NotificationService.java +++ b/src/main/java/org/poolc/api/notification/service/NotificationService.java @@ -26,6 +26,7 @@ public List getUnreadNotificationsForMember(String receiverId) { .sorted(Comparator.comparing(Notification::getCreatedAt).reversed()) .collect(Collectors.toList()); notifications.forEach(Notification::memberReads); + notificationRepository.saveAll(notifications); Member recipient = getMemberByLoginID(receiverId); recipient.resetNotificationCount(); return notifications;