Device registration retur device id on creation so it can create sub devices ass well

This commit is contained in:
JonatanRek 2019-10-09 10:58:20 +02:00
parent 65af811e3e
commit 00a9ca1068

View File

@ -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();