Browse Source

On supprime la tentative de connexion pour un article non trouvé

Sangfroid 2 months ago
parent
commit
8916ca3b15
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Controller/ViewController.php

+ 1 - 1
src/Controller/ViewController.php

@@ -12,7 +12,7 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
 class ViewController extends AbstractController
 {
     #[Route('/post/{slug}', name: 'app_view')]
-    #[IsGranted('view', 'article')]
+    #[IsGranted('view', 'article', 'Article non trouvé', 404)]
     public function index(
         #[MapEntity(mapping: ['slug' => 'slug'])]
         Article $article