From 6f81d80389c24c0f597d255fd83daf94cc06dca6 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Mon, 12 May 2025 16:24:01 +0800 Subject: [PATCH] fix: change HTTP methods from GET to PUT for disassociation and related questions endpoints --- apps/knowledge/views/paragraph.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/knowledge/views/paragraph.py b/apps/knowledge/views/paragraph.py index 98fba37b6..6bd91136a 100644 --- a/apps/knowledge/views/paragraph.py +++ b/apps/knowledge/views/paragraph.py @@ -207,7 +207,7 @@ class ParagraphView(APIView): authentication_classes = [TokenAuth] @extend_schema( - methods=['GET'], + methods=['PUT'], summary=_('Disassociation issue'), description=_('Disassociation issue'), operation_id=_('Disassociation issue'), # type: ignore @@ -216,7 +216,7 @@ class ParagraphView(APIView): tags=[_('Knowledge Base/Documentation/Paragraph')] # type: ignore ) @has_permissions(PermissionConstants.DOCUMENT_EDIT.get_workspace_permission()) - def get(self, request: Request, + def put(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str, paragraph_id: str, problem_id: str): return result.success(ParagraphSerializers.Association( data={ @@ -232,7 +232,7 @@ class ParagraphView(APIView): authentication_classes = [TokenAuth] @extend_schema( - methods=['GET'], + methods=['PUT'], summary=_('Related questions'), description=_('Related questions'), operation_id=_('Related questions'), # type: ignore @@ -241,7 +241,7 @@ class ParagraphView(APIView): tags=[_('Knowledge Base/Documentation/Paragraph')] # type: ignore ) @has_permissions(PermissionConstants.DOCUMENT_EDIT.get_workspace_permission()) - def get(self, request: Request, + def put(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str, paragraph_id: str, problem_id: str): return result.success(ParagraphSerializers.Association( data={