From 75a86394ec26725cf9460d336c03a3f55a82d599 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Sun, 23 Oct 2016 06:36:44 +0500 Subject: Rename API path --- src/org/traccar/api/resource/DeviceResource.java | 2 +- src/org/traccar/database/DeviceManager.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org') 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()); -- cgit v1.2.3