Add GeoImage endpoints
This commit is contained in:
@@ -10,7 +10,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
class GeoImageController extends AbstractController
|
||||
{
|
||||
#[Route('/geoimage', name: 'app_geo_image')]
|
||||
#[Route('/geoimages', name: 'app_geo_images')]
|
||||
public function index(EntityManagerInterface $em): JsonResponse
|
||||
{
|
||||
$repo = $em->getRepository(GeoImage::class);
|
||||
@@ -18,4 +18,19 @@ class GeoImageController extends AbstractController
|
||||
|
||||
return $this->json($geoImages);
|
||||
}
|
||||
|
||||
#[Route('/geoimages/menu', name: 'app_geo_image_menu')]
|
||||
public function menu(EntityManagerInterface $em): JsonResponse
|
||||
{
|
||||
$repo = $em->getRepository(GeoImage::class);
|
||||
$geoImages = $repo->findLabelsAndIds();
|
||||
|
||||
return $this->json($geoImages);
|
||||
}
|
||||
|
||||
#[Route('/geoimages/{id}', name: 'app_geo_image_record')]
|
||||
public function record(GeoImage $geoImage): JsonResponse
|
||||
{
|
||||
return $this->json($geoImage);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user