diff options
Diffstat (limited to 'src/org/traccar/api/resource/GroupResource.java')
-rw-r--r-- | src/org/traccar/api/resource/GroupResource.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/api/resource/GroupResource.java b/src/org/traccar/api/resource/GroupResource.java index 6b722ef6d..c98a20b7e 100644 --- a/src/org/traccar/api/resource/GroupResource.java +++ b/src/org/traccar/api/resource/GroupResource.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2016 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. @@ -67,9 +67,9 @@ public class GroupResource extends BaseResource { @Path("{id}") @PUT - public Response update(@PathParam("id") long id, Group entity) throws SQLException { + public Response update(Group entity) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); - Context.getPermissionsManager().checkGroup(getUserId(), id); + Context.getPermissionsManager().checkGroup(getUserId(), entity.getId()); Context.getDeviceManager().updateGroup(entity); if (Context.getGeofenceManager() != null) { Context.getGeofenceManager().refresh(); |