Update app.py
Browse files
app.py
CHANGED
|
@@ -341,17 +341,6 @@ def handsome_models():
|
|
| 341 |
else:
|
| 342 |
return jsonify({"error": "没有有效的key,无法获取完整模型列表。"}), 500
|
| 343 |
|
| 344 |
-
@app.route('/handsome/v1/balance', methods=['GET'])
|
| 345 |
-
def handsome_balance():
|
| 346 |
-
"""
|
| 347 |
-
处理 /handsome/v1/balance 路由的请求,添加鉴权,返回所有可用KEY的额度总和。
|
| 348 |
-
"""
|
| 349 |
-
if not check_authorization(request):
|
| 350 |
-
return jsonify({"error": "Unauthorized"}), 401
|
| 351 |
-
|
| 352 |
-
total_balance = get_total_balance()
|
| 353 |
-
return jsonify({"total_balance": total_balance})
|
| 354 |
-
|
| 355 |
@app.route('/handsome/v1/dashboard/billing/subscription'', methods=['GET'])
|
| 356 |
def handsome_balance():
|
| 357 |
"""
|
|
|
|
| 341 |
else:
|
| 342 |
return jsonify({"error": "没有有效的key,无法获取完整模型列表。"}), 500
|
| 343 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 344 |
@app.route('/handsome/v1/dashboard/billing/subscription'', methods=['GET'])
|
| 345 |
def handsome_balance():
|
| 346 |
"""
|