refactor(settings): enhance field names

This commit is contained in:
Sarah Vaupel 2024-01-13 00:40:57 +01:00
parent 5e85eae825
commit 7ca12d064d

View File

@ -299,7 +299,7 @@ makeLenses_ ''JobMode
deriveFromJSON defaultOptions
{ constructorTagModifier = camelToPathPiece' 2
, sumEncoding = TaggedObject "type" "config"
, sumEncoding = TaggedObject "protocol" "config"
} ''UserDbConf
instance FromJSON HaskellNet.PortNumber where
@ -604,7 +604,7 @@ instance FromJSON AppSettings where
Ldap.Tls host _ -> not $ null host
Ldap.Plain host -> not $ null host
nonEmptyHost (UserDbOAuth2 OAuth2Conf{..}) = not $ or [ null oauth2TenantId, null oauth2ClientId, null oauth2ClientSecret ]
appUserDbConf <- P.fromList . mapMaybe (assertM nonEmptyHost) <$> o .:? "user-db" .!= []
appUserDbConf <- P.fromList . mapMaybe (assertM nonEmptyHost) <$> o .:? "user-databases" .!= []
appLmsConf <- o .: "lms-direct"
appAvsConf <- assertM (not . null . avsPass) <$> o .:? "avs"
appLprConf <- o .: "lpr"