From 2bddf26ed1c820cf8f2be66409f995b9b23da7a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81ro=CC=82me=20Schaeffer?= Date: Fri, 22 Mar 2019 14:50:47 +0100 Subject: [PATCH] remove useless subroute home --- src/Controller/HomeController.php | 2 +- src/Controller/SecurityController.php | 2 +- src/Security/LoginFormAuthenticator.php | 2 +- templates/base.html.twig | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php index e5bd786..ad46c85 100644 --- a/src/Controller/HomeController.php +++ b/src/Controller/HomeController.php @@ -8,7 +8,7 @@ class HomeController extends AbstractController { /** - * @Route("/home", name="home") + * @Route("/", name="home") */ public function index() { diff --git a/src/Controller/SecurityController.php b/src/Controller/SecurityController.php index e40a5cf..c2b459c 100644 --- a/src/Controller/SecurityController.php +++ b/src/Controller/SecurityController.php @@ -18,7 +18,7 @@ class SecurityController extends AbstractController public function login(AuthenticationUtils $authenticationUtils): Response { if ($this->isGranted(['ROLE_GUARDIAN', 'ROLE_NURSE'])){ - return $this->redirectToRoute('home'); + return $this->redirectToRoute('index'); } // get the login error if there is one $error = $authenticationUtils->getLastAuthenticationError(); diff --git a/src/Security/LoginFormAuthenticator.php b/src/Security/LoginFormAuthenticator.php index 0e7135e..f80a08c 100644 --- a/src/Security/LoginFormAuthenticator.php +++ b/src/Security/LoginFormAuthenticator.php @@ -85,7 +85,7 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token, return new RedirectResponse($targetPath); } - return new RedirectResponse($this->router->generate('home')); + return new RedirectResponse($this->router->generate('index')); } protected function getLoginUrl() diff --git a/templates/base.html.twig b/templates/base.html.twig index 82b3eef..f77821c 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -33,12 +33,12 @@ {% block header %}