mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 09:45:33 +00:00
Fool proving registration
This commit is contained in:
1 parent
1b76e1907d
commit
35bd6b8d6a
1 file changed
+6
-1
@@ -104,7 +104,12 @@ if ($token == null || $token == "") {
|
||||
|
||||
//Vstupní Checky
|
||||
if (!DeviceManager::registeret($token)) {
|
||||
DeviceManager::create($token, $token);
|
||||
$deviceId = DeviceManager::create($token, $token);
|
||||
foreach ($values as $key => $value) {
|
||||
if (!SubDeviceManager::getSubDeviceByMaster($deviceId, $key)) {
|
||||
SubDeviceManager::create($deviceId, $key, UNITS[$key]);
|
||||
}
|
||||
}
|
||||
header("HTTP/1.1 401 Unauthorized");
|
||||
echo json_encode(array(
|
||||
'state' => 'unsuccess',
|
||||
|
||||
Reference in new issue
Block a user