aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource/GeofenceResource.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/api/resource/GeofenceResource.java')
-rw-r--r--src/org/traccar/api/resource/GeofenceResource.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/api/resource/GeofenceResource.java b/src/org/traccar/api/resource/GeofenceResource.java
index df5eb2414..591908813 100644
--- a/src/org/traccar/api/resource/GeofenceResource.java
+++ b/src/org/traccar/api/resource/GeofenceResource.java
@@ -88,9 +88,9 @@ public class GeofenceResource extends BaseResource {
@Path("{id}")
@PUT
- public Response update(@PathParam("id") long id, Geofence entity) throws SQLException {
+ public Response update(Geofence entity) throws SQLException {
Context.getPermissionsManager().checkReadonly(getUserId());
- Context.getPermissionsManager().checkGeofence(getUserId(), id);
+ Context.getPermissionsManager().checkGeofence(getUserId(), entity.getId());
Context.getGeofenceManager().updateGeofence(entity);
return Response.ok(entity).build();
}