fix: dns update comment
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/cloudflare/cloudflare-go"
|
||||
)
|
||||
@@ -64,6 +65,7 @@ func (a DnsProvider) SetDomainRecord(domain, ip string) error {
|
||||
|
||||
// update record
|
||||
record := dnsRecords[0]
|
||||
comment := fmt.Sprintf("updates on %s by BitSrunLoginGo", time.Now().Format("2006-01-02 15:04:05"))
|
||||
record, err = a.Api.UpdateDNSRecord(context.TODO(), &rc, cloudflare.UpdateDNSRecordParams{
|
||||
ID: record.ID,
|
||||
Name: record.Name,
|
||||
@@ -71,7 +73,7 @@ func (a DnsProvider) SetDomainRecord(domain, ip string) error {
|
||||
Content: ip,
|
||||
TTL: record.TTL,
|
||||
Proxied: record.Proxied,
|
||||
Comment: &record.Comment,
|
||||
Comment: &comment,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user