remove unwanted config options

This commit is contained in:
nek0 2021-10-16 17:49:50 +02:00
parent 02bc5a89a7
commit 8a7ba17c81
2 changed files with 6 additions and 10 deletions

View file

@ -8,5 +8,5 @@ listen_port: 8000
#max_connections_per_client: 10
currency: "meow"
currency_fraction: 2
block_registration: false
#block_registration: false
sendmail_path: "/run/wrappers/bin/sendmail"

View file

@ -1,25 +1,21 @@
{-# LANGUAGE TypeFamilies #-}
module Types.Settings where
import qualified Data.Text as T
import Classes
data Settings = Settings
{ settingsCurrency :: T.Text
, settingsDecimalPlaces :: Int
, settingsBlockRegistration :: Bool
{ settingsBlockRegistration :: Bool
}
deriving (Show)
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
type OutTuple Settings = (T.Text, Int, Bool)
type OutTuple Settings = Bool
fromDatabase (currency, places, reg) = Settings currency places reg
fromDatabase reg = Settings reg