diff options
author | ninioe <ninioe@gmail.com> | 2016-07-24 10:12:29 +0300 |
---|---|---|
committer | ninioe <ninioe@gmail.com> | 2016-07-24 10:12:29 +0300 |
commit | efb18afb3bc265e0d3525ad66ee0e0558d95f478 (patch) | |
tree | f5d4cc82a144072a8eec0d25f9fb592422285e1f /src/org/traccar/api/resource/GroupResource.java | |
parent | fd3a695813f511d1b94775bd4e8a4c57053fc66d (diff) | |
parent | 0c61dddb5f875e34c819f6d936fcb5e7f45d88ed (diff) | |
download | trackermap-server-efb18afb3bc265e0d3525ad66ee0e0558d95f478.tar.gz trackermap-server-efb18afb3bc265e0d3525ad66ee0e0558d95f478.tar.bz2 trackermap-server-efb18afb3bc265e0d3525ad66ee0e0558d95f478.zip |
Merge remote-tracking branch 'refs/remotes/tananaev/master'
# Conflicts:
# tools/test-generator.py
Diffstat (limited to 'src/org/traccar/api/resource/GroupResource.java')
-rw-r--r-- | src/org/traccar/api/resource/GroupResource.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/api/resource/GroupResource.java b/src/org/traccar/api/resource/GroupResource.java index 957f39ebe..eec28e325 100644 --- a/src/org/traccar/api/resource/GroupResource.java +++ b/src/org/traccar/api/resource/GroupResource.java @@ -43,20 +43,20 @@ public class GroupResource extends BaseResource { @QueryParam("all") boolean all, @QueryParam("userId") long userId) throws SQLException { if (all) { Context.getPermissionsManager().checkAdmin(getUserId()); - return Context.getDataManager().getAllGroups(); + return Context.getDeviceManager().getAllGroups(); } else { if (userId == 0) { userId = getUserId(); } Context.getPermissionsManager().checkUser(getUserId(), userId); - return Context.getDataManager().getGroups(userId); + return Context.getDeviceManager().getGroups(userId); } } @POST public Response add(Group entity) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); - Context.getDataManager().addGroup(entity); + Context.getDeviceManager().addGroup(entity); Context.getDataManager().linkGroup(getUserId(), entity.getId()); Context.getPermissionsManager().refresh(); if (Context.getGeofenceManager() != null) { @@ -70,7 +70,7 @@ public class GroupResource extends BaseResource { public Response update(@PathParam("id") long id, Group entity) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); Context.getPermissionsManager().checkGroup(getUserId(), id); - Context.getDataManager().updateGroup(entity); + Context.getDeviceManager().updateGroup(entity); if (Context.getGeofenceManager() != null) { Context.getGeofenceManager().refresh(); } @@ -82,7 +82,7 @@ public class GroupResource extends BaseResource { public Response remove(@PathParam("id") long id) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); Context.getPermissionsManager().checkGroup(getUserId(), id); - Context.getDataManager().removeGroup(id); + Context.getDeviceManager().removeGroup(id); Context.getPermissionsManager().refresh(); if (Context.getGeofenceManager() != null) { Context.getGeofenceManager().refresh(); |