diff options
author | mia <mia@mia.jetzt> | 2024-10-11 14:32:27 -0700 |
---|---|---|
committer | mia <mia@mia.jetzt> | 2024-10-11 14:32:27 -0700 |
commit | e24a342967838c10daba1618bda1bd085a033420 (patch) | |
tree | 468b528629df4a577c22364019bad4d6d85c4ce8 | |
parent | f0606a08799663f12f7999945980dc1df06fe048 (diff) | |
download | zoner-e24a342967838c10daba1618bda1bd085a033420.tar.gz zoner-e24a342967838c10daba1618bda1bd085a033420.zip |
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | zoner.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD index 61492ba..13aea4b 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,5 +1,5 @@ pkgname=zoner -pkgver=2 +pkgver=3 pkgrel=1 arch=(any) makedepends=(python-build python-installer python-wheel) 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) |