1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Fix providerState notifier not being set correctly

This commit is contained in:
Yannik Sembritzki
2023-02-06 09:59:44 +05:30
parent 4804e875ee
commit 85ce89ba17

View File

@ -363,9 +363,6 @@ type ProviderState struct {
func InitializeProviders(cfg *models.DNSConfig, providerConfigs map[string]map[string]string, notifyFlag bool) ProviderState {
var notificationCfg map[string]string
result := ProviderState{}
defer func() {
result.notifier = notifications.Init(notificationCfg)
}()
if notifyFlag {
notificationCfg = providerConfigs["notifications"]
}
@ -418,6 +415,7 @@ func InitializeProviders(cfg *models.DNSConfig, providerConfigs map[string]map[s
}
result.createdRegistrars = registrars
result.createdDnsProviders = dnsProviders
result.notifier = notifications.Init(notificationCfg)
return result
}