From 22a991d8cc017c0455d0430864b326c3f9dbc95a Mon Sep 17 00:00:00 2001 From: StackoverFrog Date: Sat, 27 Feb 2021 22:55:45 +0800 Subject: [PATCH] dnspod: improve search accuracy when a domain have more than 100 records (#1354) --- providers/dns/dnspod/dnspod.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/providers/dns/dnspod/dnspod.go b/providers/dns/dnspod/dnspod.go index fa21872b..fa6b5f7e 100644 --- a/providers/dns/dnspod/dnspod.go +++ b/providers/dns/dnspod/dnspod.go @@ -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)