Diagnostic Information update

This commit is contained in:
JonatanRek 2020-03-11 12:43:37 +01:00
parent 6184f3815f
commit 94f78af31b

View File

@ -162,7 +162,11 @@ if (!DeviceManager::approved($token)) {
// Diagnostic Data Write to DB
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!