diff options
author | Andinus <andinus@nand.sh> | 2022-06-11 15:28:13 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2022-06-11 15:28:13 +0530 |
commit | 74d75501d6ac26e84f07d25a04a4639bcf1d5f61 (patch) | |
tree | df9da09f476b0081e3273beed12b4ea3352a426c /lib/Crater/Routes | |
parent | 332862889f5add755012467d1a6303a7e2127bfa (diff) | |
download | crater-74d75501d6ac26e84f07d25a04a4639bcf1d5f61.tar.gz |
Protect logout route
Only logged in users should be able to logout.
Diffstat (limited to 'lib/Crater/Routes')
-rw-r--r-- | lib/Crater/Routes/Auth.rakumod | 2 |
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, '/'; } |