aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/api/resource/DeviceResource.java2
-rw-r--r--src/org/traccar/database/DeviceManager.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/api/resource/DeviceResource.java b/src/org/traccar/api/resource/DeviceResource.java
index 449083cb1..1f65fa041 100644
--- a/src/org/traccar/api/resource/DeviceResource.java
+++ b/src/org/traccar/api/resource/DeviceResource.java
@@ -93,7 +93,7 @@ public class DeviceResource extends BaseResource {
return Response.noContent().build();
}
- @Path("{id}/totaldistance")
+ @Path("{id}/distance")
@PUT
public Response updateTotalDistance(@PathParam("id") long id, DeviceTotalDistance entity) throws SQLException {
Context.getPermissionsManager().checkAdmin(getUserId());
diff --git a/src/org/traccar/database/DeviceManager.java b/src/org/traccar/database/DeviceManager.java
index 7d16c1c32..f71b9308c 100644
--- a/src/org/traccar/database/DeviceManager.java
+++ b/src/org/traccar/database/DeviceManager.java
@@ -430,7 +430,7 @@ public class DeviceManager implements IdentityManager {
return result;
}
- public void resetTotalDistance(DeviceTotalDistance deviceTotalDistance) throws SQLException {
+ public void resetTotalDistance(DeviceTotalDistance deviceTotalDistance) throws SQLException {
Position last = positions.get(deviceTotalDistance.getDeviceId());
if (last != null) {
last.getAttributes().put(Position.KEY_TOTAL_DISTANCE, deviceTotalDistance.getTotalDistance());