Debug remove_edition > variable of bad due to a copy/paste

This commit is contained in:
Kouril42 2023-02-21 16:54:38 +01:00
parent a84bf895f3
commit fb39b2195c

View File

@ -103,7 +103,7 @@ class MapApiController extends AbstractController
}
}
else {
return $this->json(["Error on represantation attribute"]);
return $this->json("Error on represantation attribute");
}
$building = $floor->getBuilding();
return $this->json(['idSite' => $building->getSite()->getId(),
@ -205,7 +205,7 @@ class MapApiController extends AbstractController
{
$edit = $rep->findEditionById($id);
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);
return $this->json(["removed"]);
}