Git Stats + Remove Empty Rooms

This commit is contained in:
GamerClassN7 2021-02-14 20:13:29 +01:00
parent 1d44bd62e2
commit 485709d61f
2 changed files with 3 additions and 0 deletions

View File

@ -54,6 +54,7 @@ class RoomsApi extends ApiController
foreach ($roomsData as $roomKey => $roomData) { foreach ($roomsData as $roomKey => $roomData) {
if ($roomData['device_count'] == 0) continue; if ($roomData['device_count'] == 0) continue;
$subDevicesSorted = isset($subDevicesData[$roomData['room_id']]) ? Utilities::sortArrayByKey($subDevicesData[$roomData['room_id']], 'connection_error', 'asc') : []; $subDevicesSorted = isset($subDevicesData[$roomData['room_id']]) ? Utilities::sortArrayByKey($subDevicesData[$roomData['room_id']], 'connection_error', 'asc') : [];
if (count($subDevicesSorted) == 0) continue;
$response[] = [ $response[] = [
'room_id' => $roomData['room_id'], 'room_id' => $roomData['room_id'],
'name' => $roomData['name'], 'name' => $roomData['name'],

2
git-stats.ps1 Normal file
View File

@ -0,0 +1,2 @@
$lines = (ls -r|sls '^\s*(#|$)' -a -n).Count
write-host $lines" of code"