aboutsummaryrefslogtreecommitdiff
path: root/src/server/Conf.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/Conf.hs')
-rw-r--r--src/server/Conf.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/Conf.hs b/src/server/Conf.hs
index a05349d..92df4e9 100644
--- a/src/server/Conf.hs
+++ b/src/server/Conf.hs
@@ -10,11 +10,13 @@ import qualified Data.Text as T
import qualified Data.ConfigManager as Conf
import Data.Time.Clock (NominalDiffTime)
+import Common.Model.Currency (Currency(..))
+
data Conf = Conf
{ hostname :: Text
, port :: Int
, signInExpiration :: NominalDiffTime
- , currency :: Text
+ , currency :: Currency
, noReplyMail :: Text
, https :: Bool
} deriving Show
@@ -28,7 +30,7 @@ get path = do
Conf.lookup "hostname" conf <*>
Conf.lookup "port" conf <*>
Conf.lookup "signInExpiration" conf <*>
- Conf.lookup "currency" conf <*>
+ fmap Currency (Conf.lookup "currency" conf) <*>
Conf.lookup "noReplyMail" conf <*>
Conf.lookup "https" conf
)