From ca2cb2dbd22d5feeec1cd39a05b673633bba3a54 Mon Sep 17 00:00:00 2001 From: JonatanRek Date: Fri, 13 Mar 2020 16:25:09 +0100 Subject: [PATCH] API fix --- api.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api.php b/api.php index dbe26a2..8920d9f 100644 --- a/api.php +++ b/api.php @@ -172,7 +172,9 @@ if ($settings != null || $settings != ""){ // Issuing command if ($command == "null"){ - $deviceCommand = DeviceManager::getDeviceByToken($token)["command"]; + $device = DeviceManager::getDeviceByToken($token); + $deviceId = $device['device_id']; + $deviceCommand = $device["command"]; if ($deviceCommand != '' || $deviceCommand != null) { $command = $deviceCommand;