mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Update the component of the agent API with parameters. (#4131)
### What problem does this PR solve? Update the component of the agent API with parameters. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [x] New Feature (non-breaking change which adds functionality) - [x] Refactoring --------- Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn> Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com> Co-authored-by: writinwaters <93570324+writinwaters@users.noreply.github.com>
This commit is contained in:
@ -283,7 +283,10 @@ def construct_error_response(e):
|
||||
def token_required(func):
|
||||
@wraps(func)
|
||||
def decorated_function(*args, **kwargs):
|
||||
authorization_list=flask_request.headers.get('Authorization').split()
|
||||
authorization_str=flask_request.headers.get('Authorization')
|
||||
if not authorization_str:
|
||||
return get_json_result(data=False,message="`Authorization` can't be empty")
|
||||
authorization_list=authorization_str.split()
|
||||
if len(authorization_list) < 2:
|
||||
return get_json_result(data=False,message="Please check your authorization format.")
|
||||
token = authorization_list[1]
|
||||
|
||||
Reference in New Issue
Block a user