dnspod: improve search accuracy when a domain have more than 100 records (#1354)
This commit is contained in:
parent
55baf65065
commit
22a991d8cc
1 changed files with 3 additions and 3 deletions
|
@ -174,14 +174,14 @@ func (d *DNSProvider) findTxtRecords(domain, fqdn string) ([]dnspod.Record, erro
|
|||
return nil, err
|
||||
}
|
||||
|
||||
recordName := extractRecordName(fqdn, zoneName)
|
||||
|
||||
var records []dnspod.Record
|
||||
result, _, err := d.client.Records.List(zoneID, "")
|
||||
result, _, err := d.client.Records.List(zoneID, recordName)
|
||||
if err != nil {
|
||||
return records, fmt.Errorf("API call has failed: %w", err)
|
||||
}
|
||||
|
||||
recordName := extractRecordName(fqdn, zoneName)
|
||||
|
||||
for _, record := range result {
|
||||
if record.Name == recordName {
|
||||
records = append(records, record)
|
||||
|
|
Loading…
Reference in a new issue