Merge remote-tracking branch 'origin/main'

This commit is contained in:
Mysaa 2023-02-21 16:33:38 +01:00
commit 62ad25b179
Signed by: Mysaa
GPG Key ID: 7054D5D6A90F084F
3 changed files with 7 additions and 7 deletions

6
API.md
View File

@ -37,7 +37,7 @@ __Errors :__
---------------------
### /api/map/
### /api/map/get_all_floors/
> Return every sites, buildings and floors of the DB.
__The json will look like :__
@ -151,9 +151,9 @@ __Errors :__
---------------------
### /api/map/get_all_editions
> Return a list of all editions currently pending.
> Return a list of all editions currently pending. ie returns a table of dict, each representing en edition.
__Each place is a dict :__
__Each edition is a dict :__
```json
{
'id': int // id of the edition,

View File

@ -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);
}

View File

@ -71,7 +71,7 @@ class Place
}
public function setType(string $type): bool
{
if ($type == 'C' or $type == 'S' or $type == 'E' or $type == 'R') {
if ($type == 'C' or $type == 'S' or $type == 'L' or $type == 'R') {
$this->type = $type;
return true;
}