remove unwanted config options
This commit is contained in:
parent
02bc5a89a7
commit
8a7ba17c81
2 changed files with 6 additions and 10 deletions
|
@ -8,5 +8,5 @@ listen_port: 8000
|
||||||
#max_connections_per_client: 10
|
#max_connections_per_client: 10
|
||||||
currency: "meow"
|
currency: "meow"
|
||||||
currency_fraction: 2
|
currency_fraction: 2
|
||||||
block_registration: false
|
#block_registration: false
|
||||||
sendmail_path: "/run/wrappers/bin/sendmail"
|
sendmail_path: "/run/wrappers/bin/sendmail"
|
||||||
|
|
|
@ -1,25 +1,21 @@
|
||||||
{-# LANGUAGE TypeFamilies #-}
|
{-# LANGUAGE TypeFamilies #-}
|
||||||
module Types.Settings where
|
module Types.Settings where
|
||||||
|
|
||||||
import qualified Data.Text as T
|
|
||||||
|
|
||||||
import Classes
|
import Classes
|
||||||
|
|
||||||
data Settings = Settings
|
data Settings = Settings
|
||||||
{ settingsCurrency :: T.Text
|
{ settingsBlockRegistration :: Bool
|
||||||
, settingsDecimalPlaces :: Int
|
|
||||||
, settingsBlockRegistration :: Bool
|
|
||||||
}
|
}
|
||||||
deriving (Show)
|
deriving (Show)
|
||||||
|
|
||||||
instance ToDatabase Settings where
|
instance ToDatabase Settings where
|
||||||
|
|
||||||
type InTuple Settings = (T.Text, Int, Bool)
|
type InTuple Settings = Bool
|
||||||
|
|
||||||
toDatabase (Settings currency places reg) = (currency, places, reg)
|
toDatabase (Settings reg) = reg
|
||||||
|
|
||||||
instance FromDatabase Settings where
|
instance FromDatabase Settings where
|
||||||
|
|
||||||
type OutTuple Settings = (T.Text, Int, Bool)
|
type OutTuple Settings = Bool
|
||||||
|
|
||||||
fromDatabase (currency, places, reg) = Settings currency places reg
|
fromDatabase reg = Settings reg
|
||||||
|
|
Loading…
Reference in a new issue