Hosting.de: Allow using as registrar only (#1307)

Previously, the provider would always try to fetch the zone config for
the domain. But that doesn't work if the domain's DNS is not managed
through Hosting.de.

With this patch, getDomainConfig() instead filters directly on the
domain name instead of re-fetching it from the zone.

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Benjamin Altpeter 2021-11-27 18:44:28 +00:00 committed by GitHub
parent 58a5a4bcf0
commit 2cfd2f403b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,15 +20,10 @@ type hostingdeProvider struct {
} }
func (hp *hostingdeProvider) getDomainConfig(domain string) (*domainConfig, error) { func (hp *hostingdeProvider) getDomainConfig(domain string) (*domainConfig, error) {
zc, err := hp.getZoneConfig(domain)
if err != nil {
return nil, fmt.Errorf("error getting zone config: %w", err)
}
params := request{ params := request{
Filter: filter{ Filter: filter{
Field: "domainName", Field: "domainName",
Value: zc.Name, Value: domain,
}, },
} }