Fix setting the ocdav machine auth api key from the common config

This commit is contained in:
André Duffeck
2022-07-05 11:46:01 +02:00
parent 92f7b37a57
commit 9b40b6b152

View File

@@ -94,6 +94,10 @@ func EnsureDefaults(cfg *config.Config) {
} else if cfg.TokenManager == nil {
cfg.TokenManager = &config.TokenManager{}
}
if cfg.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" {
cfg.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey
}
}
func Sanitize(cfg *config.Config) {