fix: Niami rating example fail on revealing domain
All checks were successful
Build Docker / Build Image (push) Successful in 24s
All checks were successful
Build Docker / Build Image (push) Successful in 24s
This commit is contained in:
parent
340898959d
commit
6e382b0e6e
@ -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}
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user