File size: 526 Bytes
cf8b9d7
ea4b4a9
 
 
272ca01
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from bot import main

if __name__ == '__main__':
    main()
from flask import Flask, request, jsonify

app = Flask(__name__)

@app.route('/token', methods=['POST'])
def distribute_token():
    data = request.get_json()
    user_id = data.get('user_id')
    token_amount = data.get('amount')

    # Mock token distribution logic
    return jsonify({
        "status": "success",
        "message": f"Distributed {token_amount} tokens to user {user_id}"
    })

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=7860)