1
0
Fork 0

Fix some DNS providers issues

This commit is contained in:
Ludovic Fernandez 2018-09-21 18:38:02 +02:00 committed by Traefiker Bot
parent 9ab5cbf235
commit 38d655636d
8 changed files with 62 additions and 30 deletions

View file

@ -127,7 +127,10 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
}
_, err = rsc.CreateOrUpdate(ctx, d.config.ResourceGroup, zone, relative, dns.TXT, rec, "", "")
return fmt.Errorf("azure: %v", err)
if err != nil {
return fmt.Errorf("azure: %v", err)
}
return nil
}
// CleanUp removes the TXT record matching the specified parameters
@ -150,7 +153,10 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
rsc.Authorizer = autorest.NewBearerAuthorizer(spt)
_, err = rsc.Delete(ctx, d.config.ResourceGroup, zone, relative, dns.TXT, "")
return fmt.Errorf("azure: %v", err)
if err != nil {
return fmt.Errorf("azure: %v", err)
}
return nil
}
// Checks that azure has a zone for this domain name.