aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource/GeofenceResource.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/GeofenceResource.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/GeofenceResource.java')
-rw-r--r--src/org/traccar/api/resource/GeofenceResource.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/api/resource/GeofenceResource.java b/src/org/traccar/api/resource/GeofenceResource.java
index c9cc72bd7..341180cf8 100644
--- a/src/org/traccar/api/resource/GeofenceResource.java
+++ b/src/org/traccar/api/resource/GeofenceResource.java
@@ -85,7 +85,7 @@ public class GeofenceResource extends BaseResource {
public Response add(Geofence entity) throws SQLException {
Context.getPermissionsManager().checkReadonly(getUserId());
Context.getGeofenceManager().addItem(entity);
- linkNew(entity);
+ linkNewEntity(entity);
Context.getGeofenceManager().refreshUserItems();
return Response.ok(entity).build();
}
@@ -94,7 +94,7 @@ public class GeofenceResource extends BaseResource {
@PUT
public Response update(Geofence entity) throws SQLException {
Context.getPermissionsManager().checkReadonly(getUserId());
- Context.getPermissionsManager().checkPermission(Context.TYPE_GEOFENCE, getUserId(), entity.getId());
+ Context.getPermissionsManager().checkPermission(Geofence.class, getUserId(), entity.getId());
Context.getGeofenceManager().updateItem(entity);
return Response.ok(entity).build();
}
@@ -103,7 +103,7 @@ public class GeofenceResource extends BaseResource {
@DELETE
public Response remove(@PathParam("id") long id) throws SQLException {
Context.getPermissionsManager().checkReadonly(getUserId());
- Context.getPermissionsManager().checkPermission(Context.TYPE_GEOFENCE, getUserId(), id);
+ Context.getPermissionsManager().checkPermission(Geofence.class, getUserId(), id);
Context.getGeofenceManager().removeItem(id);
return Response.noContent().build();
}