From 1a605980b1a120614ccaeb56faac37b05a81a4e9 Mon Sep 17 00:00:00 2001 From: Gábor Somogyi Date: Tue, 3 May 2016 23:15:27 +0200 Subject: Removed database.selectLatestPosition --- src/org/traccar/api/resource/SupportedCommandResource.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/org/traccar/api/resource/SupportedCommandResource.java') diff --git a/src/org/traccar/api/resource/SupportedCommandResource.java b/src/org/traccar/api/resource/SupportedCommandResource.java index 849447060..bf4fd4969 100644 --- a/src/org/traccar/api/resource/SupportedCommandResource.java +++ b/src/org/traccar/api/resource/SupportedCommandResource.java @@ -34,9 +34,9 @@ public class SupportedCommandResource extends BaseResource { @GET public Collection get(@QueryParam("deviceId") long deviceId) throws SQLException { Context.getPermissionsManager().checkDevice(getUserId(), deviceId); - Position latestPosition = Context.getDataManager().getLatestPosition(deviceId); - if (latestPosition != null) { - return Context.getServerManager().getProtocolSuppportedCommands(latestPosition.getProtocol()); + Position lastPosition = Context.getConnectionManager().getLastPosition(deviceId); + if (lastPosition != null) { + return Context.getServerManager().getProtocolSuppportedCommands(lastPosition.getProtocol()); } else { return Collections.EMPTY_LIST; } -- cgit v1.2.3