From 536a9ceaa14cd06e32bbe505b2eec49af537f317 Mon Sep 17 00:00:00 2001 From: Neshura Date: Sun, 27 Nov 2022 18:42:46 +0100 Subject: [PATCH] Revert change from put to patch for now Syntax between put and path seems to be somewhat different, change was causing the script to fail --- cloudflare_script.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudflare_script.py b/cloudflare_script.py index ce8c9d3..1085a18 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.patch(zone_id, dns_record_id, data=new_dnsrecords) + r = cf.zones.dns_records.put(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.patch(zone_id, dns_record_id, data=new_dnsrecords) + r = cf.zones.dns_records.put(zone_id, dns_record_id, data=new_dnsrecords) print(r) case 'skipping': print("Done")