mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 09:45:33 +00:00
Device registration retur device id on creation so it can create sub devices ass well
This commit is contained in:
1 parent
65af811e3e
commit
00a9ca1068
1 file changed
+1
@@ -29,6 +29,7 @@ class DeviceManager{
|
||||
);
|
||||
try {
|
||||
Db::add ('devices', $device);
|
||||
return Db::loadOne("SELECT device_id FROM devices WHERE token = ?", array($token))['device_id'];
|
||||
} catch(PDOException $error) {
|
||||
echo $error->getMessage();
|
||||
die();
|
||||
|
||||
Reference in new issue
Block a user