| import requests | |
| BASE_URL = "https://dotandru-buddymath-dev.hf.space" | |
| TOKEN = "BUDDY-MATH-DEV-2026-BYPASS" | |
| headers = { | |
| "Authorization": f"Bearer {TOKEN}" | |
| } | |
| def fix_dotan_balance(): | |
| # 1. Get stats to find UID | |
| print("FETCHING admin stats...") | |
| res = requests.get(f"{BASE_URL}/admin/stats", headers=headers) | |
| if res.status_code != 200: | |
| print(f"FAILED to get stats: {res.status_code} {res.text}") | |
| return | |
| users = res.json().get('users', []) | |
| uid = None | |
| for user in users: | |
| name = user.get('name', '').lower() | |
| if 'dotan' in name: | |
| uid = user.get('uid') | |
| print(f"FOUND User: {user.get('name')} (UID: {uid})") | |
| break | |
| if not uid: | |
| print("NOT found in stats.") | |
| return | |
| # 2. Call fix_balance | |
| print(f"FIXING balance for UID: {uid}...") | |
| res = requests.post(f"{BASE_URL}/admin/fix_balance/{uid}", headers=headers) | |
| print(f"RESULT: {res.status_code} {res.json()}") | |
| if __name__ == "__main__": | |
| fix_dotan_balance() | |