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
This commit is contained in:
Neshura 2022-11-27 18:42:46 +01:00
parent aaa3da5cbb
commit 536a9ceaa1
No known key found for this signature in database
GPG key ID: ACDF5B6EBECF6B0A

View file

@ -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")