Get site with id
This commit is contained in:
parent
95d78be851
commit
6dc99531c7
@ -49,12 +49,9 @@ class SiteController extends AbstractController
|
|||||||
return $this->json($sites);
|
return $this->json($sites);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Route('/site/{gisId<\w+>}', name: 'app_site_record')]
|
#[Route('/sites/{id<\w+>}', name: 'app_site_record')]
|
||||||
public function record(
|
//#[MapEntity(mapping: ['gisId' => 'gisId'])]
|
||||||
#[MapEntity(mapping: ['gisId' => 'gisId'])]
|
public function record(Site $site, EntityManagerInterface $em): JsonResponse
|
||||||
Site $site,
|
|
||||||
EntityManagerInterface $em
|
|
||||||
): JsonResponse
|
|
||||||
{
|
{
|
||||||
$repo = $em->getRepository(Site::class);
|
$repo = $em->getRepository(Site::class);
|
||||||
$coords = $repo->coordinates($site->getId());
|
$coords = $repo->coordinates($site->getId());
|
||||||
|
Loading…
Reference in New Issue
Block a user