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:
Jack
2026-04-14 17:12:23 +08:00
committed by GitHub
parent 57aec2e65d
commit 576431de99
7 changed files with 16 additions and 25 deletions

View File

@@ -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):