From 56e144005b6b9569fd7d168dfda06bc3f811661c Mon Sep 17 00:00:00 2001 From: Neshura Date: Sun, 27 Nov 2022 18:42:46 +0100 Subject: [PATCH] Revert "Revert change from put to patch for now" This reverts commit 536a9ceaa14cd06e32bbe505b2eec49af537f317. --- cloudflare_script.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudflare_script.py b/cloudflare_script.py index 1085a18..ce8c9d3 100644 --- a/cloudflare_script.py +++ b/cloudflare_script.py @@ -64,7 +64,7 @@ def main(): if fullname in dns_names['A']: new_dnsrecords = {"name": fullname, "type": "A", "content": ip_address_new} print(f"Sending request {new_dnsrecords}") - r = cf.zones.dns_records.put(zone_id, dns_record_id, data=new_dnsrecords) + r = cf.zones.dns_records.patch(zone_id, dns_record_id, data=new_dnsrecords) print(r) case '6': @@ -84,7 +84,7 @@ def main(): if fullname in dns_names['AAAA']: new_dnsrecords = {"name": fullname, "type": "AAAA", "content": ip_address_new} print(f"Sending request {new_dnsrecords}") - r = cf.zones.dns_records.put(zone_id, dns_record_id, data=new_dnsrecords) + r = cf.zones.dns_records.patch(zone_id, dns_record_id, data=new_dnsrecords) print(r) case 'skipping': print("Done")