Merge branch 'dev' of https://git.steelants.cz/JonatanRek/PHP_SMART_HOME_V3 into dev
This commit is contained in:
commit
50100fd4c5
6
api.php
6
api.php
@ -162,7 +162,11 @@ if (!DeviceManager::approved($token)) {
|
|||||||
|
|
||||||
// Diagnostic Data Write to DB
|
// Diagnostic Data Write to DB
|
||||||
if (isset($settings)){
|
if (isset($settings)){
|
||||||
DeviceManager::editByToken($token, ['mac' => $settings["network"]["mac"], 'ip_address' => $settings["network"]["ip"]]);
|
$data = ['mac' => $settings["network"]["mac"], 'ip_address' => $settings["network"]["ip"]];
|
||||||
|
if (array_key_exists("firmware_hash", $settings)) {
|
||||||
|
$data .= ['firmware_hash'=>$settings["firmware_hash"]];
|
||||||
|
}
|
||||||
|
DeviceManager::editByToken($token, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Subdevices first data!
|
// Subdevices first data!
|
||||||
|
Loading…
Reference in New Issue
Block a user