aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/api/resource
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-07-07 12:48:35 -0700
committerAnton Tananaev <anton@traccar.org>2024-07-07 12:48:35 -0700
commitcf6aa038b7514201ffb89fa26a4ba7d921b8f16f (patch)
tree671cf39466dfe8bb7f837c25f4d52d3362b19575 /src/main/java/org/traccar/api/resource
parentd0536ccbc1b7234784c5e48288bbac00a60ef821 (diff)
downloadtrackermap-server-cf6aa038b7514201ffb89fa26a4ba7d921b8f16f.tar.gz
trackermap-server-cf6aa038b7514201ffb89fa26a4ba7d921b8f16f.tar.bz2
trackermap-server-cf6aa038b7514201ffb89fa26a4ba7d921b8f16f.zip
Migrate to records
Diffstat (limited to 'src/main/java/org/traccar/api/resource')
-rw-r--r--src/main/java/org/traccar/api/resource/NotificationResource.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/api/resource/NotificationResource.java b/src/main/java/org/traccar/api/resource/NotificationResource.java
index a41d00cf3..8bc81a3a4 100644
--- a/src/main/java/org/traccar/api/resource/NotificationResource.java
+++ b/src/main/java/org/traccar/api/resource/NotificationResource.java
@@ -85,7 +85,7 @@ public class NotificationResource extends ExtendedObjectResource<Notification> {
public Collection<Typed> getNotificators(@QueryParam("announcement") boolean announcement) {
Set<String> announcementsUnsupported = Set.of("command", "web");
return notificatorManager.getAllNotificatorTypes().stream()
- .filter(typed -> !announcement || !announcementsUnsupported.contains(typed.getType()))
+ .filter(typed -> !announcement || !announcementsUnsupported.contains(typed.type()))
.collect(Collectors.toUnmodifiableSet());
}
@@ -94,7 +94,7 @@ public class NotificationResource extends ExtendedObjectResource<Notification> {
public Response testMessage() throws MessageException, StorageException {
User user = permissionsService.getUser(getUserId());
for (Typed method : notificatorManager.getAllNotificatorTypes()) {
- notificatorManager.getNotificator(method.getType()).send(null, user, new Event("test", 0), null);
+ notificatorManager.getNotificator(method.type()).send(null, user, new Event("test", 0), null);
}
return Response.noContent().build();
}