From 4fc750b585dd6b2953b16408dd57a8ef93fdeee9 Mon Sep 17 00:00:00 2001 From: Ivan Martinez Date: Fri, 1 Jun 2018 09:48:07 -0300 Subject: move NotificatorManager instance to Context --- src/org/traccar/api/resource/NotificationResource.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/org/traccar/api') diff --git a/src/org/traccar/api/resource/NotificationResource.java b/src/org/traccar/api/resource/NotificationResource.java index 2a398f40d..830e34fc0 100644 --- a/src/org/traccar/api/resource/NotificationResource.java +++ b/src/org/traccar/api/resource/NotificationResource.java @@ -31,7 +31,6 @@ import org.traccar.model.Event; import org.traccar.model.Notification; import org.traccar.model.Typed; import org.traccar.notification.NotificationException; -import org.traccar.notification.NotificatorManager; @Path("notifications") @@ -52,8 +51,8 @@ public class NotificationResource extends ExtendedObjectResource { @POST @Path("test") public Response testMessage() throws NotificationException, InterruptedException { - NotificatorManager.getMail().sendSync(getUserId(), new Event("test", 0), null); - NotificatorManager.getSms().sendSync(getUserId(), new Event("test", 0), null); + Context.getNotificatorManager().getMail().sendSync(getUserId(), new Event("test", 0), null); + Context.getNotificatorManager().getSms().sendSync(getUserId(), new Event("test", 0), null); return Response.noContent().build(); } -- cgit v1.2.3