🗝
about summary refs log tree commit diff
path: root/zoner.py
diff options
context:
space:
mode:
authormia <mia@mia.jetzt>2024-10-11 14:32:27 -0700
committermia <mia@mia.jetzt>2024-10-11 14:32:27 -0700
commite24a342967838c10daba1618bda1bd085a033420 (patch)
tree468b528629df4a577c22364019bad4d6d85c4ce8 /zoner.py
parentf0606a08799663f12f7999945980dc1df06fe048 (diff)
downloadzoner-e24a342967838c10daba1618bda1bd085a033420.tar.gz
zoner-e24a342967838c10daba1618bda1bd085a033420.zip
update api hostname HEAD main
Diffstat (limited to 'zoner.py')
-rw-r--r--zoner.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/zoner.py b/zoner.py
index 7772384..077e4b5 100644
--- a/zoner.py
+++ b/zoner.py
@@ -87,7 +87,7 @@ def check_porkbun(resp: httpx.Response):
 
 def retrieve(domain: str):
     resp = httpx.post(
-        f"https://porkbun.com/api/json/v3/dns/retrieve/{domain}",
+        f"https://api.porkbun.com/api/json/v3/dns/retrieve/{domain}",
         json={"apikey": cfg["api_key"], "secretapikey": cfg["secret_key"]},
     )
     check_porkbun(resp)
@@ -95,7 +95,7 @@ def retrieve(domain: str):
         if record["type"] == "NS":
             continue
         if record["type"] == "MX":
-            # add prioty to content
+            # add priority to content
             record["content"] = f"{record['prio']} {record['content']}"
         if record["ttl"] == None:
             record["ttl"] = 600
@@ -157,7 +157,7 @@ def balance(domain: str):
     for record in to_delete:
         print(f"delete {record}")
         resp = httpx.post(
-            f"https://porkbun.com/api/json/v3/dns/delete/{domain}/{record.meta['id']}",
+            f"https://api.porkbun.com/api/json/v3/dns/delete/{domain}/{record.meta['id']}",
             json={"apikey": cfg["api_key"], "secretapikey": cfg["secret_key"]},
         )
         check_porkbun(resp)