diff options
Diffstat (limited to 'src/server/Main.hs')
-rw-r--r-- | src/server/Main.hs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/server/Main.hs b/src/server/Main.hs index 9734781..387f782 100644 --- a/src/server/Main.hs +++ b/src/server/Main.hs @@ -3,6 +3,7 @@ import Web.Scotty import Network.Wai.Middleware.Static +import Network.HTTP.Types.Status (ok200) import Control.Concurrent (forkIO) @@ -41,14 +42,12 @@ main = do notFound $ ( do signInToken <- param "signInToken" :: ActionM Text - successOrError <- validateSignIn conf signInToken - case successOrError of - Left errorKey -> - (getIndex conf (Just errorKey)) - Right _ -> - (getIndex conf Nothing) - ) `rescue` (\_ -> getIndex conf Nothing) - + status ok200 + getIndex conf (Just signInToken) + ) `rescue` (\_ -> do + status ok200 + getIndex conf Nothing + ) api :: Conf -> ScottyM () api conf = do |