aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-08-23 08:48:20 +0500
committerAbyss777 <abyss@fox5.ru>2018-08-23 08:48:20 +0500
commit12bb168b88fc3dbcdf59c2fec1a919e20ab57838 (patch)
treee66c633881d6befb4b1415f2a190c7941343a905 /src/org/traccar/api
parent2a386eab0a4baed5c606113dd9a875a088f9f4e5 (diff)
downloadtrackermap-server-12bb168b88fc3dbcdf59c2fec1a919e20ab57838.tar.gz
trackermap-server-12bb168b88fc3dbcdf59c2fec1a919e20ab57838.tar.bz2
trackermap-server-12bb168b88fc3dbcdf59c2fec1a919e20ab57838.zip
Implement Device Engine Hours reset
Diffstat (limited to 'src/org/traccar/api')
-rw-r--r--src/org/traccar/api/resource/DeviceResource.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/api/resource/DeviceResource.java b/src/org/traccar/api/resource/DeviceResource.java
index 87927e45b..4f0d7ab3b 100644
--- a/src/org/traccar/api/resource/DeviceResource.java
+++ b/src/org/traccar/api/resource/DeviceResource.java
@@ -20,7 +20,7 @@ import org.traccar.api.BaseObjectResource;
import org.traccar.database.DeviceManager;
import org.traccar.helper.LogAction;
import org.traccar.model.Device;
-import org.traccar.model.DeviceTotalDistance;
+import org.traccar.model.DeviceAccumulators;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
@@ -85,15 +85,15 @@ public class DeviceResource extends BaseObjectResource<Device> {
return deviceManager.getItems(result);
}
- @Path("{id}/distance")
+ @Path("{id}/accumulators")
@PUT
- public Response updateTotalDistance(DeviceTotalDistance entity) throws SQLException {
+ public Response updateAccumulators(DeviceAccumulators entity) throws SQLException {
if (!Context.getPermissionsManager().getUserAdmin(getUserId())) {
Context.getPermissionsManager().checkManager(getUserId());
Context.getPermissionsManager().checkPermission(Device.class, getUserId(), entity.getDeviceId());
}
- Context.getDeviceManager().resetTotalDistance(entity);
- LogAction.resetTotalDistance(getUserId(), entity.getDeviceId());
+ Context.getDeviceManager().resetDeviceAccumulators(entity);
+ LogAction.resetDeviceAccumulators(getUserId(), entity.getDeviceId());
return Response.noContent().build();
}