diff options
author | Joris | 2017-03-24 09:21:04 +0000 |
---|---|---|
committer | Joris | 2017-03-24 09:21:04 +0000 |
commit | cfca18262c1ff48dcb683ddab7d03cf8e55573ff (patch) | |
tree | 8a438430cee7411259fc395d8f3898488e85d750 /src/server/Controller/Index.hs | |
parent | 293eb8295162bf0a038f488237db9c9d1316c04d (diff) |
Features/categories
Diffstat (limited to 'src/server/Controller/Index.hs')
-rw-r--r-- | src/server/Controller/Index.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/Controller/Index.hs b/src/server/Controller/Index.hs index abb3b17..96d0a49 100644 --- a/src/server/Controller/Index.hs +++ b/src/server/Controller/Index.hs @@ -1,18 +1,18 @@ module Controller.Index - ( getIndex + ( get , signOut ) where import Control.Monad.IO.Class (liftIO) -import Web.Scotty +import Web.Scotty hiding (get) import Network.HTTP.Types.Status (ok200) import Data.Text (Text) import Data.Time.Clock (getCurrentTime, diffUTCTime) -import Database.Persist hiding (Key) +import Database.Persist hiding (Key, get) import Conf (Conf(..)) import qualified LoginSession @@ -28,8 +28,8 @@ import Model.Init (getInit) import View.Page (page) -getIndex :: Conf -> Maybe Text -> ActionM () -getIndex conf mbToken = do +get :: Conf -> Maybe Text -> ActionM () +get conf mbToken = do initResult <- case mbToken of Just token -> do userOrError <- validateSignIn conf token |