This commit is contained in:
JonatanRek 2020-05-24 19:44:58 +02:00
parent e7858ac4a3
commit 254a2cf97a

View File

@ -27,11 +27,7 @@ class RoomsApi extends ApiController{
public function update($roomId){
//$this->requireAuth();
$subDevicesData = SubDeviceManager::getSubdevicesByRoomIds($roomIds);
foreach ($roomsData as $roomKey => $roomData) {
$response[] = isset($subDevicesData[$roomData['room_id']]) ? $subDevicesData[$roomData['room_id']] : [];
}
$this->response($response);
$subDevicesData = SubDeviceManager::getSubdevicesByRoomIds([$roomId]);
$this->response($subDevicesData);
}
}