diff --git a/src/Guide/Main.hs b/src/Guide/Main.hs index 0371f3b..afd16b9 100644 --- a/src/Guide/Main.hs +++ b/src/Guide/Main.hs @@ -314,13 +314,13 @@ guideApp waiMetrics = do -- plain "/auth" logs out a logged-in user and lets a logged-out user -- log in (this is not the best idea, granted, and we should just - -- shot logged-in users a “logout” link and logged-out users a + -- show logged-in users a “logout” link and logged-out users a -- “login” link instead) Spock.get (authRoute root) $ do user <- getLoggedInUser if isJust user - then Spock.redirect "auth/logout" - else Spock.redirect "auth/login" + then Spock.redirect "/auth/logout" + else Spock.redirect "/auth/login" Spock.getpost (authRoute "login") $ authRedirect "/" loginAction Spock.get (authRoute "logout") logoutAction Spock.getpost (authRoute "register") $ authRedirect "/" signupAction diff --git a/src/Guide/Routes.hs b/src/Guide/Routes.hs index 2c79ac6..219bfeb 100644 --- a/src/Guide/Routes.hs +++ b/src/Guide/Routes.hs @@ -24,7 +24,7 @@ haskellRoute :: Path '[] 'Open haskellRoute = "haskell" authRoute :: Path '[] 'Open -authRoute = haskellRoute "auth" +authRoute = "auth" setRoute :: Path '[] 'Open setRoute = haskellRoute "set" @@ -45,4 +45,4 @@ renderRoute :: Path '[] 'Open renderRoute = haskellRoute "render" adminRoute :: Path '[] 'Open -adminRoute = haskellRoute "admin" +adminRoute = "admin"