From 7530522cbca477cb822cb494ffe12480e5237934 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Wed, 13 Sep 2017 13:46:38 +0500 Subject: Re implement "getSupportedCommands" function --- src/org/traccar/api/resource/CommandResource.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/org/traccar/api/resource') diff --git a/src/org/traccar/api/resource/CommandResource.java b/src/org/traccar/api/resource/CommandResource.java index b7ea022de..6a258497f 100644 --- a/src/org/traccar/api/resource/CommandResource.java +++ b/src/org/traccar/api/resource/CommandResource.java @@ -45,12 +45,11 @@ public class CommandResource extends ExtendedObjectResource { @GET @Path("send") - public Collection get(@QueryParam("deviceId") long deviceId, - @QueryParam("textChannel") boolean textChannel) throws SQLException { + public Collection get(@QueryParam("deviceId") long deviceId) throws SQLException { Context.getPermissionsManager().checkDevice(getUserId(), deviceId); CommandsManager commandsManager = Context.getCommandsManager(); Set result = new HashSet<>(commandsManager.getUserItems(getUserId())); - result.retainAll(commandsManager.getSupportedCommands(deviceId, textChannel)); + result.retainAll(commandsManager.getSupportedCommands(deviceId)); return commandsManager.getItems(result); } -- cgit v1.2.3