diff --git a/config.yaml b/config.yaml index 66f8b30..a548777 100644 --- a/config.yaml +++ b/config.yaml @@ -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" diff --git a/src/Types/Settings.hs b/src/Types/Settings.hs index bf39357..d31d8e8 100644 --- a/src/Types/Settings.hs +++ b/src/Types/Settings.hs @@ -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