浏览代码

Fix incorrect API endpoint routing from PR #25628 (#25778)

tags/1.9.0
-LAN- 1 个月前
父节点
当前提交
b5a7e64e19
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 14 次插入6 次删除
  1. 6
    6
      api/controllers/console/app/workflow.py
  2. 8
    0
      api/controllers/console/datasets/datasets_document.py

+ 6
- 6
api/controllers/console/app/workflow.py 查看文件

@@ -513,7 +513,7 @@ class DraftWorkflowRunApi(Resource):
raise InvokeRateLimitHttpError(ex.description)


@console_ns.route("/apps/<uuid:app_id>/workflows/tasks/<string:task_id>/stop")
@console_ns.route("/apps/<uuid:app_id>/workflow-runs/tasks/<string:task_id>/stop")
class WorkflowTaskStopApi(Resource):
@api.doc("stop_workflow_task")
@api.doc(description="Stop running workflow task")
@@ -682,7 +682,7 @@ class PublishedWorkflowApi(Resource):
}


@console_ns.route("/apps/<uuid:app_id>/workflows/default-block-configs")
@console_ns.route("/apps/<uuid:app_id>/workflows/default-workflow-block-configs")
class DefaultBlockConfigsApi(Resource):
@api.doc("get_default_block_configs")
@api.doc(description="Get default block configurations for workflow")
@@ -708,7 +708,7 @@ class DefaultBlockConfigsApi(Resource):
return workflow_service.get_default_block_configs()


@console_ns.route("/apps/<uuid:app_id>/workflows/default-block-configs/<string:block_type>")
@console_ns.route("/apps/<uuid:app_id>/workflows/default-workflow-block-configs/<string:block_type>")
class DefaultBlockConfigApi(Resource):
@api.doc("get_default_block_config")
@api.doc(description="Get default block configuration by type")
@@ -791,7 +791,7 @@ class ConvertToWorkflowApi(Resource):
}


@console_ns.route("/apps/<uuid:app_id>/workflows/config")
@console_ns.route("/apps/<uuid:app_id>/workflows/draft/config")
class WorkflowConfigApi(Resource):
"""Resource for workflow configuration."""

@@ -809,7 +809,7 @@ class WorkflowConfigApi(Resource):
}


@console_ns.route("/apps/<uuid:app_id>/workflows/published")
@console_ns.route("/apps/<uuid:app_id>/workflows")
class PublishedAllWorkflowApi(Resource):
@api.doc("get_all_published_workflows")
@api.doc(description="Get all published workflows for an application")
@@ -865,7 +865,7 @@ class PublishedAllWorkflowApi(Resource):
}


@console_ns.route("/apps/<uuid:app_id>/workflows/<uuid:workflow_id>")
@console_ns.route("/apps/<uuid:app_id>/workflows/<string:workflow_id>")
class WorkflowByIdApi(Resource):
@api.doc("update_workflow_by_id")
@api.doc(description="Update workflow by ID")

+ 8
- 0
api/controllers/console/datasets/datasets_document.py 查看文件

@@ -499,6 +499,7 @@ class DocumentIndexingEstimateApi(DocumentResource):
return response, 200


@console_ns.route("/datasets/<uuid:dataset_id>/batch/<string:batch>/indexing-estimate")
class DocumentBatchIndexingEstimateApi(DocumentResource):
@setup_required
@login_required
@@ -591,6 +592,7 @@ class DocumentBatchIndexingEstimateApi(DocumentResource):
raise IndexingEstimateError(str(e))


@console_ns.route("/datasets/<uuid:dataset_id>/batch/<string:batch>/indexing-status")
class DocumentBatchIndexingStatusApi(DocumentResource):
@setup_required
@login_required
@@ -910,6 +912,7 @@ class DocumentMetadataApi(DocumentResource):
return {"result": "success", "message": "Document metadata updated."}, 200


@console_ns.route("/datasets/<uuid:dataset_id>/documents/status/<string:action>/batch")
class DocumentStatusApi(DocumentResource):
@setup_required
@login_required
@@ -946,6 +949,7 @@ class DocumentStatusApi(DocumentResource):
return {"result": "success"}, 200


@console_ns.route("/datasets/<uuid:dataset_id>/documents/<uuid:document_id>/processing/pause")
class DocumentPauseApi(DocumentResource):
@setup_required
@login_required
@@ -979,6 +983,7 @@ class DocumentPauseApi(DocumentResource):
return {"result": "success"}, 204


@console_ns.route("/datasets/<uuid:dataset_id>/documents/<uuid:document_id>/processing/resume")
class DocumentRecoverApi(DocumentResource):
@setup_required
@login_required
@@ -1009,6 +1014,7 @@ class DocumentRecoverApi(DocumentResource):
return {"result": "success"}, 204


@console_ns.route("/datasets/<uuid:dataset_id>/retry")
class DocumentRetryApi(DocumentResource):
@setup_required
@login_required
@@ -1052,6 +1058,7 @@ class DocumentRetryApi(DocumentResource):
return {"result": "success"}, 204


@console_ns.route("/datasets/<uuid:dataset_id>/documents/<uuid:document_id>/rename")
class DocumentRenameApi(DocumentResource):
@setup_required
@login_required
@@ -1075,6 +1082,7 @@ class DocumentRenameApi(DocumentResource):
return document


@console_ns.route("/datasets/<uuid:dataset_id>/documents/<uuid:document_id>/website-sync")
class WebsiteDocumentSyncApi(DocumentResource):
@setup_required
@login_required

正在加载...
取消
保存