mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-03-22 15:07:44 +08:00
Fix: launch an agent. (#13039)
### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -633,9 +633,20 @@ def get_session(canvas_id, session_id):
|
||||
return get_json_result(
|
||||
data=False, message='Only owner of canvas authorized for this operation.',
|
||||
code=RetCode.OPERATING_ERROR)
|
||||
conv = API4ConversationService.get_by_id(session_id)
|
||||
_, conv = API4ConversationService.get_by_id(session_id)
|
||||
return get_json_result(data=conv.to_dict())
|
||||
|
||||
|
||||
|
||||
@manager.route('/<canvas_id>/sessions/<session_id>', methods=['DELETE']) # noqa: F821
|
||||
@login_required
|
||||
def del_session(canvas_id, session_id):
|
||||
tenant_id = current_user.id
|
||||
if not UserCanvasService.accessible(canvas_id, tenant_id):
|
||||
return get_json_result(
|
||||
data=False, message='Only owner of canvas authorized for this operation.',
|
||||
code=RetCode.OPERATING_ERROR)
|
||||
return get_json_result(data=API4ConversationService.delete_by_id(session_id))
|
||||
|
||||
|
||||
@manager.route('/prompts', methods=['GET']) # noqa: F821
|
||||
@login_required
|
||||
|
||||
Reference in New Issue
Block a user