mirror of
https://gitlab.aliens-lyon.fr/encartes/backend.git
synced 2026-03-17 22:51:04 +01:00
Debug remove_edition > variable of bad due to a copy/paste
This commit is contained in:
parent
a84bf895f3
commit
fb39b2195c
@ -103,7 +103,7 @@ class MapApiController extends AbstractController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return $this->json(["Error on represantation attribute"]);
|
return $this->json("Error on represantation attribute");
|
||||||
}
|
}
|
||||||
$building = $floor->getBuilding();
|
$building = $floor->getBuilding();
|
||||||
return $this->json(['idSite' => $building->getSite()->getId(),
|
return $this->json(['idSite' => $building->getSite()->getId(),
|
||||||
@ -205,7 +205,7 @@ class MapApiController extends AbstractController
|
|||||||
{
|
{
|
||||||
$edit = $rep->findEditionById($id);
|
$edit = $rep->findEditionById($id);
|
||||||
if (sizeof($edit) == 0) {throw new NotFoundHttpException('Error: '.$id.' doesn\'t correspond to any edit.'); }
|
if (sizeof($edit) == 0) {throw new NotFoundHttpException('Error: '.$id.' doesn\'t correspond to any edit.'); }
|
||||||
elseif (sizeof($places)>1) { throw new Exception('Internal Error: '.$id.' refers to more than one edit ; the BDD is corrupted.'); }
|
elseif (sizeof($edit)>1) { throw new Exception('Internal Error: '.$id.' refers to more than one edit ; the BDD is corrupted.'); }
|
||||||
$rep->remove($edit[0], true);
|
$rep->remove($edit[0], true);
|
||||||
return $this->json(["removed"]);
|
return $this->json(["removed"]);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user