mirror of
https://gitlab.aliens-lyon.fr/encartes/backend.git
synced 2026-03-17 14:41:03 +01:00
get_all_floors was returning lists of lists, which was stupid, it now returns lists
This commit is contained in:
parent
366cef7a0a
commit
ce3563f627
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user