1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-22 11:33:34 +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
then Spock.redirect "auth/logout"
else Spock.redirect "auth/login"
Spock.getpost "login" $ authRedirect "/" loginAction
Spock.get "logout" logoutAction
Spock.getpost "register" $ authRedirect "/" signupAction
Spock.getpost (authRoute <//> "login") $ authRedirect "/" loginAction
Spock.get (authRoute <//> "logout") logoutAction
Spock.getpost (authRoute <//> "register") $ authRedirect "/" signupAction
loginAction :: GuideAction ctx ()
loginAction = do