From cf07a8c0bb461f1487cbaaa21a6f141be56d1959 Mon Sep 17 00:00:00 2001 From: orvice Date: Wed, 16 Aug 2023 14:05:20 +0800 Subject: [PATCH] fix --- dns/cloudflare.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dns/cloudflare.go b/dns/cloudflare.go index d911000..6f8a3ef 100644 --- a/dns/cloudflare.go +++ b/dns/cloudflare.go @@ -109,9 +109,7 @@ func (c *CloudFlare) UpdateIP(ctx context.Context, domain, ip string) error { } oldIP := r.Content r.Content = ip - r, err = c.client.UpdateDNSRecord(ctx, &cloudflare.ResourceContainer{ - Identifier: r.ID, - }, cloudflare.UpdateDNSRecordParams{ + r, err = c.client.UpdateDNSRecord(ctx, cloudflare.ResourceIdentifier(zid), cloudflare.UpdateDNSRecordParams{ ID: r.ID, Type: r.Type, Name: r.Name, @@ -119,8 +117,10 @@ func (c *CloudFlare) UpdateIP(ctx context.Context, domain, ip string) error { }) slog.Info("update dns record", + "type", r.Type, "record_id", r.ID, - "domain", domain, "old_ip", oldIP, "new_ip", ip) + "domain", domain, "old_ip", + oldIP, "new_ip", ip) if err != nil { slog.Error("update dns record error",