Not found if path is root

This commit is contained in:
Nicolò P 2024-11-14 16:15:20 +01:00
parent 028dae3d4e
commit 325e255d75

View File

@ -10,6 +10,15 @@ use Symfony\Bridge\Doctrine\Attribute\MapEntity;
class SiteController extends AbstractController
{
#[Route('/', name: 'app_home')]
public function root(): JsonResponse
{
return $this->json([
'message' => 'Path not found',
'status' => 404
], 404);
}
#[Route('/site/{gisId<\w+>}', name: 'app_site')]
public function index(
#[MapEntity(mapping: ['gisId' => 'gisId'])]