Device registration retur device id on creation so it can create sub devices ass well
This commit is contained in:
parent
65af811e3e
commit
00a9ca1068
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user