mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-12 11:43:39 +08:00
Refactor: Change update doc from PUT to patch (#14067)
### What problem does this PR solve? Before change, update_document in api/apps/restful_apis/document_api.py is using "PUT". After change, it will use "PATCH" which is more suitable. ### Type of change - [x] Refactoring
This commit is contained in:
@@ -32,7 +32,7 @@ from api.utils.validation_utils import (
|
||||
UpdateDocumentReq, format_validation_error_message,
|
||||
)
|
||||
|
||||
@manager.route("/datasets/<dataset_id>/documents/<document_id>", methods=["PUT"]) # noqa: F821
|
||||
@manager.route("/datasets/<dataset_id>/documents/<document_id>", methods=["PATCH"]) # noqa: F821
|
||||
@login_required
|
||||
@add_tenant_id_to_kwargs
|
||||
async def update_document(tenant_id, dataset_id, document_id):
|
||||
|
||||
Reference in New Issue
Block a user