Covid last Data Fix
This commit is contained in:
parent
ce05533d29
commit
0b954b79c0
@ -23,7 +23,7 @@ class Covid extends VirtualDeviceManager
|
|||||||
$json = json_decode(Utilities::CallAPI('GET', $finalUrl, ''), true);
|
$json = json_decode(Utilities::CallAPI('GET', $finalUrl, ''), true);
|
||||||
|
|
||||||
foreach ($dataItems as $dataItem) {
|
foreach ($dataItems as $dataItem) {
|
||||||
RecordManager::create($deviceId, strtolower($dataItem), $json[0][$dataItem]);
|
RecordManager::create($deviceId, strtolower($dataItem), end($json)[$dataItem]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name);
|
DeviceManager::create($this->virtual_device_name, $this->virtual_device_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user