From 74d75501d6ac26e84f07d25a04a4639bcf1d5f61 Mon Sep 17 00:00:00 2001 From: Andinus Date: Sat, 11 Jun 2022 15:28:13 +0530 Subject: Protect logout route Only logged in users should be able to logout. --- lib/Crater/Routes/Auth.rakumod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Crater/Routes') diff --git a/lib/Crater/Routes/Auth.rakumod b/lib/Crater/Routes/Auth.rakumod index 73e6dc7..aef2c48 100644 --- a/lib/Crater/Routes/Auth.rakumod +++ b/lib/Crater/Routes/Auth.rakumod @@ -25,7 +25,7 @@ sub auth-routes( } } } - get -> Crater::Session $session, 'logout' { + get -> LoggedIn $session, 'logout' { $session.logged-in = False; redirect :see-other, '/'; } -- cgit 1.4.1-2-gfad0