Add Blackbox AI Pro model and fix URL redirect format in backend_api.py

This commit is contained in:
kqlio67
2025-03-26 18:18:01 +02:00
parent c3cc412dc8
commit 29139b1172
4 changed files with 13 additions and 3 deletions

View File

@@ -371,7 +371,7 @@ class Backend_Api(Api):
match_files = [file for file, count in match_files.items() if count >= request.args.get("min", len(search))]
if int(request.args.get("skip", 0)) >= len(match_files):
return jsonify({"error": {"message": "Not found"}}), 404
return redirect(f"/media/{match_files[int(request.args.get("skip", 0))]}"), 302
return redirect(f"/media/{match_files[int(request.args.get('skip', 0))]}", 302)
@app.route('/backend-api/v2/upload_cookies', methods=['POST'])
def upload_cookies():
@@ -455,4 +455,4 @@ class Backend_Api(Api):
Returns:
str: A JSON formatted string.
"""
return json.dumps(super()._format_json(response_type, content, **kwargs)) + "\n"
return json.dumps(super()._format_json(response_type, content, **kwargs)) + "\n"