Skip to content

Commit

Permalink
Merge pull request #4 from terrydash/master
Browse files Browse the repository at this point in the history
fix dnspod sub_domain param from api doc
  • Loading branch information
jeessy2 authored Sep 1, 2020
2 parents 6e7c182 + 9f0033f commit 6680efa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dns/dnspod.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func (dnspod *Dnspod) addUpdateDomainRecords(recordType string) {
if err != nil {
return
}

if len(result.Records) > 0 {
// 更新
dnspod.modify(result, domain, recordType, ipAddr)
Expand All @@ -90,7 +91,7 @@ func (dnspod *Dnspod) create(result DnspodRecordListResp, domain *Domain, record
url.Values{
"login_token": {dnspod.DNSConfig.ID + "," + dnspod.DNSConfig.Secret},
"domain": {domain.DomainName},
"subDomain": {domain.SubDomain},
"sub_domain": {domain.SubDomain},
"record_type": {recordType},
"record_line": {"默认"},
"value": {ipAddr},
Expand All @@ -117,7 +118,7 @@ func (dnspod *Dnspod) modify(result DnspodRecordListResp, domain *Domain, record
url.Values{
"login_token": {dnspod.DNSConfig.ID + "," + dnspod.DNSConfig.Secret},
"domain": {domain.DomainName},
"subDomain": {domain.SubDomain},
"sub_domain": {domain.SubDomain},
"record_type": {recordType},
"record_line": {"默认"},
"record_id": {record.ID},
Expand Down

0 comments on commit 6680efa

Please sign in to comment.