1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-26 03:08:37 +03:00

Fix auth page

This commit is contained in:
vrom911 2017-08-12 18:09:17 +03:00
parent 0aee35e67f
commit fba73d6531

View File

@ -321,9 +321,9 @@ guideApp waiMetrics = do
if isJust user if isJust user
then Spock.redirect "auth/logout" then Spock.redirect "auth/logout"
else Spock.redirect "auth/login" else Spock.redirect "auth/login"
Spock.getpost "login" $ authRedirect "/" loginAction Spock.getpost (authRoute <//> "login") $ authRedirect "/" loginAction
Spock.get "logout" logoutAction Spock.get (authRoute <//> "logout") logoutAction
Spock.getpost "register" $ authRedirect "/" signupAction Spock.getpost (authRoute <//> "register") $ authRedirect "/" signupAction
loginAction :: GuideAction ctx () loginAction :: GuideAction ctx ()
loginAction = do loginAction = do