From ce3563f6278f545bfcc51f2f63dffab1d26bd1fa Mon Sep 17 00:00:00 2001 From: Kouril42 Date: Tue, 21 Feb 2023 16:25:43 +0100 Subject: [PATCH] get_all_floors was returning lists of lists, which was stupid, it now returns lists --- src/Controller/MapApiController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Controller/MapApiController.php b/src/Controller/MapApiController.php index e994549..0d7e45e 100644 --- a/src/Controller/MapApiController.php +++ b/src/Controller/MapApiController.php @@ -122,11 +122,11 @@ class MapApiController extends AbstractController foreach ($s->getBuildings() as $b) { $buildJSON = array(); foreach ($b->getFloors() as $f){ - $buildJSON[] = array(['name' => $f->getName(), 'id' => $f->getId()]); + $buildJSON[] = array('name' => $f->getName(), 'id' => $f->getId()); } - $siteJSON[] = array(['name' => $b->getName(), 'id' => $b->getId(), 'floors' => $buildJSON]); + $siteJSON[] = array('name' => $b->getName(), 'id' => $b->getId(), 'floors' => $buildJSON); } - $response[] = array(['name' => $s->getName(), 'id' => $s->getId(), 'buildings' => $siteJSON]); + $response[] = array('name' => $s->getName(), 'id' => $s->getId(), 'buildings' => $siteJSON); } return $this->json($response); }