Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
orvice committed Aug 16, 2023
1 parent a5e3545 commit cf07a8c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dns/cloudflare.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,18 @@ 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,
Content: ip,
})

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",
Expand Down

0 comments on commit cf07a8c

Please sign in to comment.