feat: Add stats page
All checks were successful
Build Docker / Build Image (push) Successful in 18s

This commit is contained in:
2023-11-08 12:55:10 +11:00
parent 29a0a128fb
commit 45b56dc3cb
2 changed files with 16 additions and 6 deletions

12
gift.py
View File

@@ -116,4 +116,14 @@ def gift(name,email,referer, ip):
return "Error sending gift:<br>" + send_name.text
return True
return True
def balance():
headers = {"Accept": "application/json", "Content-Type": "application/json"}
user_info = requests.get(nb_endpoint + "/api/user",headers=headers, cookies=cookies)
if user_info.status_code != 200:
return "Error getting user info:<br>" + user_info.text
user_info = user_info.json()
hns_balance = user_info['hns_balance']
hns_balance = int(hns_balance)/1000000
return hns_balance