Skip to content

Commit 62d0089

Browse files
committed
fix: change HTTP methods from GET to PUT for document synchronization endpoints
1 parent 0374314 commit 62d0089

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/knowledge/views/document.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class SyncWeb(APIView):
228228
authentication_classes = [TokenAuth]
229229

230230
@extend_schema(
231-
methods=['GET'],
231+
methods=['PUT'],
232232
description=_('Synchronize web site types'),
233233
summary=_('Synchronize web site types'),
234234
operation_id=_('Synchronize web site types'), # type: ignore
@@ -248,7 +248,7 @@ class SyncWeb(APIView):
248248
get_document_operation_object(keywords.get('document_id'))
249249
),
250250
)
251-
def get(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str):
251+
def put(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str):
252252
return result.success(DocumentSerializers.Sync(
253253
data={'document_id': document_id, 'knowledge_id': knowledge_id, 'workspace_id': workspace_id}
254254
).sync())

0 commit comments

Comments
 (0)