This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package ru.soune.nocopy.scheduler;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
@@ -55,7 +57,11 @@ public class MonitoringScheduler {
|
||||
|
||||
Set<Long> usersForNotifications = groupingFilesMonitoring.keySet();
|
||||
for (Long userId : usersForNotifications) {
|
||||
notificationService.addNotification(NotificationType.MONITORING_RESULT, userId);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
ObjectNode context = mapper.createObjectNode();
|
||||
context.put("message", "Monitoring files on monitoring");
|
||||
|
||||
notificationService.addNotification(NotificationType.MONITORING_RESULT, userId, context.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user