This commit is contained in:
2021-01-05 13:24:49 +01:00
parent 1415c0cf2d
commit 696ff07987
4 changed files with 9 additions and 6 deletions

View File

@@ -7,7 +7,9 @@ class DeviceManager{
WHERE approved != ?", Array(2));
}
static function setHeartbeat($deviceId){
self::edit($deviceId, ['heartbeat' => date("Y-m-d H:i:s", time())]);
}
static function getAllDevicesInRoom ($roomId = "") {
return Db::loadAll ("SELECT * FROM devices WHERE room_id = ? AND approved != ?", Array($roomId, 2));