File size: 1,037 Bytes
3091d31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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()