mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +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 {
|
try {
|
||||||
Db::add ('devices', $device);
|
Db::add ('devices', $device);
|
||||||
|
return Db::loadOne("SELECT device_id FROM devices WHERE token = ?", array($token))['device_id'];
|
||||||
} catch(PDOException $error) {
|
} catch(PDOException $error) {
|
||||||
echo $error->getMessage();
|
echo $error->getMessage();
|
||||||
die();
|
die();
|
||||||
|
|||||||
Reference in new issue
Block a user