aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-06-26 12:05:16 +0500
committerAbyss777 <abyss@fox5.ru>2018-06-26 12:05:16 +0500
commit825ee0d178a24620f075cb4ffb8d49c75b046484 (patch)
tree2bc60aaea8d4c1eff707ae6e0b8ff558d45d15dc /src/org/traccar/api
parentaba402226403f8b3eb58cc01e8f536eb4104d35a (diff)
downloadtrackermap-server-825ee0d178a24620f075cb4ffb8d49c75b046484.tar.gz
trackermap-server-825ee0d178a24620f075cb4ffb8d49c75b046484.tar.bz2
trackermap-server-825ee0d178a24620f075cb4ffb8d49c75b046484.zip
Cleanup and some adjustments
Diffstat (limited to 'src/org/traccar/api')
-rw-r--r--src/org/traccar/api/resource/NotificationResource.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/org/traccar/api/resource/NotificationResource.java b/src/org/traccar/api/resource/NotificationResource.java
index 2347b43fa..9046569a0 100644
--- a/src/org/traccar/api/resource/NotificationResource.java
+++ b/src/org/traccar/api/resource/NotificationResource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 - 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 - 2018 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,8 +52,9 @@ public class NotificationResource extends ExtendedObjectResource<Notification> {
@POST
@Path("test")
public Response testMessage() throws NotificationException, InterruptedException {
- for (String method : Context.getNotificatorManager().getNotificatorTypes()) {
- Context.getNotificatorManager().getNotificator(method).sendSync(getUserId(), new Event("test", 0), null);
+ for (Typed method : Context.getNotificatorManager().getNotificatorTypes()) {
+ Context.getNotificatorManager()
+ .getNotificator(method.getType()).sendSync(getUserId(), new Event("test", 0), null);
}
return Response.noContent().build();
}
@@ -68,7 +69,7 @@ public class NotificationResource extends ExtendedObjectResource<Notification> {
@GET
@Path("notificators")
- public Collection<String> getNotificators() {
+ public Collection<Typed> getNotificators() {
return Context.getNotificatorManager().getNotificatorTypes();
}