diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-03-08 22:05:40 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-03-08 22:05:40 +1300 |
commit | 1f2328bd8f4e341dda897fcd52418beb6cf1b83a (patch) | |
tree | 5d45665cc47058f7dddaf1f203914a5d832b996b /src/org/traccar/api | |
parent | fef4d92b25ef420f2926865b073835132881e7d6 (diff) | |
download | traccar-server-1f2328bd8f4e341dda897fcd52418beb6cf1b83a.tar.gz traccar-server-1f2328bd8f4e341dda897fcd52418beb6cf1b83a.tar.bz2 traccar-server-1f2328bd8f4e341dda897fcd52418beb6cf1b83a.zip |
Add new and update old data models
Diffstat (limited to 'src/org/traccar/api')
-rw-r--r-- | src/org/traccar/api/resource/PermissionResource.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/api/resource/PermissionResource.java b/src/org/traccar/api/resource/PermissionResource.java index 50deb77c2..7cf2b4ed9 100644 --- a/src/org/traccar/api/resource/PermissionResource.java +++ b/src/org/traccar/api/resource/PermissionResource.java @@ -17,7 +17,7 @@ package org.traccar.api.resource; import org.traccar.Context; import org.traccar.api.BaseResource; -import org.traccar.model.Permission; +import org.traccar.model.DevicePermission; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; @@ -34,7 +34,7 @@ import java.sql.SQLException; public class PermissionResource extends BaseResource { @POST - public Response add(Permission entity) throws SQLException { + public Response add(DevicePermission entity) throws SQLException { Context.getPermissionsManager().checkAdmin(getUserId()); Context.getDataManager().linkDevice(entity.getUserId(), entity.getDeviceId()); Context.getPermissionsManager().refresh(); @@ -42,7 +42,7 @@ public class PermissionResource extends BaseResource { } @DELETE - public Response remove(Permission entity) throws SQLException { + public Response remove(DevicePermission entity) throws SQLException { Context.getPermissionsManager().checkAdmin(getUserId()); Context.getDataManager().unlinkDevice(entity.getUserId(), entity.getDeviceId()); Context.getPermissionsManager().refresh(); |