Santim / app.py
Seraph19's picture
Update app.py
272ca01 verified
raw
history blame
526 Bytes
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)