Rename show_place_info into get_place_info

This commit is contained in:
Kouril42
2023-02-28 17:20:24 +01:00
parent 679adf5bb4
commit b447a71d89
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -150,7 +150,7 @@ __Errors :__
--------------------- ---------------------
### /api/map/show_place_info/ID ### /api/map/get_place_info/ID
> Return a dict with main pieces of informations of the place ID. > Return a dict with main pieces of informations of the place ID.
+2 -2
View File
@@ -160,8 +160,8 @@ class MapApiController extends AbstractController
} }
#[Route('/api/map/show_place_info/{id}')] #[Route('/api/map/get_place_info/{id}')]
public function show_place_info(PlaceRepository $rep, int $id): JsonResponse public function get_place_info(PlaceRepository $rep, int $id): JsonResponse
{ {
$places = $rep->findPlaceById($id); $places = $rep->findPlaceById($id);
if (sizeof($places) == 0) { throw new NotFoundHttpException('Error: '.$id.' doesn\'t correspond to any place.'); } if (sizeof($places) == 0) { throw new NotFoundHttpException('Error: '.$id.' doesn\'t correspond to any place.'); }