fix: Niami rating example fail on revealing domain
All checks were successful
Build Docker / Build Image (push) Successful in 24s

This commit is contained in:
Nathan Woodburn 2024-02-12 22:07:18 +11:00
parent 340898959d
commit 6e382b0e6e
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 2 additions and 5 deletions

View File

@ -161,6 +161,8 @@ def niami(params, authentication):
domain = params["domain"] domain = params["domain"]
response = requests.get(f"https://api.handshake.niami.io/domain/{domain}") response = requests.get(f"https://api.handshake.niami.io/domain/{domain}")
data = response.json()["data"] data = response.json()["data"]
if 'rating' not in data:
return {"rating":"No rating found."}
rating = str(data["rating"]["score"]) + " (" + data["rating"]["rarity"] + ")" rating = str(data["rating"]["score"]) + " (" + data["rating"]["rarity"] + ")"
return {"rating":rating} return {"rating":rating}

View File

@ -66,11 +66,6 @@ def transactions(txs):
html += f'<tr><td>{action}</td><td>{address}</td><td>{hash}</td>{confirmations}<td>{amount} HNS</td></tr>' html += f'<tr><td>{action}</td><td>{address}</td><td>{hash}</td>{confirmations}<td>{amount} HNS</td></tr>'
return html return html