summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2022-06-11 15:28:13 +0530
committerAndinus <andinus@nand.sh>2022-06-11 15:28:13 +0530
commit74d75501d6ac26e84f07d25a04a4639bcf1d5f61 (patch)
treedf9da09f476b0081e3273beed12b4ea3352a426c
parent332862889f5add755012467d1a6303a7e2127bfa (diff)
downloadcrater-74d75501d6ac26e84f07d25a04a4639bcf1d5f61.tar.gz
Protect logout route
Only logged in users should be able to logout.
-rw-r--r--lib/Crater/Routes/Auth.rakumod2
1 files changed, 1 insertions, 1 deletions
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, '/';
         }