From e24a342967838c10daba1618bda1bd085a033420 Mon Sep 17 00:00:00 2001 From: mia Date: Fri, 11 Oct 2024 14:32:27 -0700 Subject: update api hostname --- PKGBUILD | 2 +- 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) -- cgit 1.4.1