Make snip public index available if not logged in

This commit is contained in:
Tim
2025-04-14 23:48:32 +02:00
parent 22c8126cea
commit 5cec259469
5 changed files with 35 additions and 16 deletions

View File

@ -11,6 +11,10 @@ class HomeController extends AbstractController
#[Route('/', name: 'home')]
public function home(): Response
{
return $this->redirectToRoute('snip_index');
if ($this->getUser()) {
return $this->redirectToRoute('snip_index');
} else {
return $this->redirectToRoute('snip_public');
}
}
}