From 6b466f616035c2fc03359d182c074f096d6b7f17 Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 29 Aug 2015 13:30:09 +0200 Subject: Showing exceeding payers --- src/server/Config.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/server/Config.hs') diff --git a/src/server/Config.hs b/src/server/Config.hs index 9bc780f..895b355 100644 --- a/src/server/Config.hs +++ b/src/server/Config.hs @@ -14,19 +14,21 @@ import Control.Monad.Trans.Error (runErrorT) import Control.Monad.IO.Class (liftIO) import Control.Monad (join) import Control.Arrow (left) -import Control.Applicative (liftA2) +import Control.Applicative (liftA3) data Config = Config { hostname :: Text , port :: Int + , signInExpirationMn :: Int } deriving (Read, Eq, Show) getConfig :: FilePath -> IO (Either Text Config) getConfig filePath = left (T.pack . show) <$> (runErrorT $ do cp <- join $ liftIO $ readfile emptyCP filePath - liftA2 + liftA3 Config (T.pack <$> get cp "DEFAULT" "hostname") (get cp "DEFAULT" "port") + (get cp "DEFAULT" "sign-in-expiration-mn") ) -- cgit v1.2.3