NAMECHEAP: Enable get-zones (#3775)

This commit is contained in:
Will Power 2025-09-29 18:43:03 +01:00 committed by GitHub
parent 589cb77c68
commit 9b32a2f9b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -356,6 +356,20 @@ func (n *namecheapProvider) GetNameservers(domainName string) ([]*models.Nameser
return models.ToNameservers(NamecheapDefaultNs)
}
func (n *namecheapProvider) ListZones() ([]string, error) {
zones, err := n.client.DomainsGetList()
if err != nil {
return nil, err
}
var zoneList []string
for _, zone := range zones {
zoneList = append(zoneList, zone.Name)
}
return zoneList, nil
}
// GetRegistrarCorrections returns corrections to update nameservers.
func (n *namecheapProvider) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
var info *nc.DomainInfo