fix: Use correct varo for linking

This commit is contained in:
Nathan Woodburn 2025-03-07 14:57:39 +11:00
parent 52e43cf073
commit 4f20a0ec87
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -223,13 +223,13 @@ def hnslinks(params, authentication):
tlsa = response["TLSA"]
# Get zones from varo
with open("user_data/varo.json", "r") as f:
with open("user_data/hnslinks.json", "r") as f:
auth = json.load(f)
if not auth:
return {"status": "Missing Varo API or instance"}
if 'api' not in auth or 'instance' not in auth:
if 'key' not in auth or 'instance' not in auth:
return {"status": "Missing Varo API or instance"}
api = auth["api"]
api = auth["key"]
instance = auth["instance"]
response = requests.post(f"https://{instance}/api", json={"action":"getZones"}, headers={"Authorization": f"Bearer {api}"})