aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource/EventResource.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-07-21 18:41:49 +0500
committerAbyss777 <abyss@fox5.ru>2017-07-21 18:41:49 +0500
commit69c46399ee0f6b3dd2b0589cb412e9e17f040369 (patch)
tree4d838e7c52df78acaae804eaa08911825edc0acd /src/org/traccar/api/resource/EventResource.java
parent55d91ec7a86777bb0427422c15c2b8a60aa00071 (diff)
downloadtrackermap-server-69c46399ee0f6b3dd2b0589cb412e9e17f040369.tar.gz
trackermap-server-69c46399ee0f6b3dd2b0589cb412e9e17f040369.tar.bz2
trackermap-server-69c46399ee0f6b3dd2b0589cb412e9e17f040369.zip
Use classes instead of constants everywhere
Diffstat (limited to 'src/org/traccar/api/resource/EventResource.java')
-rw-r--r--src/org/traccar/api/resource/EventResource.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/api/resource/EventResource.java b/src/org/traccar/api/resource/EventResource.java
index 85f981514..b7fda6f73 100644
--- a/src/org/traccar/api/resource/EventResource.java
+++ b/src/org/traccar/api/resource/EventResource.java
@@ -12,6 +12,7 @@ import javax.ws.rs.core.MediaType;
import org.traccar.Context;
import org.traccar.api.BaseResource;
import org.traccar.model.Event;
+import org.traccar.model.Geofence;
@Path("events")
@Produces(MediaType.APPLICATION_JSON)
@@ -25,7 +26,7 @@ public class EventResource extends BaseResource {
Event event = Context.getDataManager().getEvent(id);
Context.getPermissionsManager().checkDevice(getUserId(), event.getDeviceId());
if (event.getGeofenceId() != 0) {
- Context.getPermissionsManager().checkPermission(Context.TYPE_GEOFENCE, getUserId(), event.getGeofenceId());
+ Context.getPermissionsManager().checkPermission(Geofence.class, getUserId(), event.getGeofenceId());
}
return event;
}