From 36da813eeaa27fcb7ea3c77893a23899a9b6a9f8 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Wed, 7 May 2025 13:53:04 +0800 Subject: [PATCH] feat: implement Paragraph API for CRUD operations and batch deletion --- 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 25b339943..b6b75ef7b 100644 --- a/apps/knowledge/views/paragraph.py +++ b/apps/knowledge/views/paragraph.py @@ -187,7 +187,7 @@ class ParagraphView(APIView): authentication_classes = [TokenAuth] @extend_schema( - methods=['PUT'], + methods=['GET'], summary=_('Disassociation issue'), description=_('Disassociation issue'), operation_id=_('Disassociation issue'), @@ -196,7 +196,7 @@ class ParagraphView(APIView): tags=[_('Knowledge Base/Documentation/Paragraph')] ) @has_permissions(PermissionConstants.DOCUMENT_EDIT.get_workspace_permission()) - def put(self, request: Request, + def get(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str, paragraph_id: str, problem_id: str): return result.success(ParagraphSerializers.Association( data={ @@ -212,7 +212,7 @@ class ParagraphView(APIView): authentication_classes = [TokenAuth] @extend_schema( - methods=['PUT'], + methods=['GET'], summary=_('Related questions'), description=_('Related questions'), operation_id=_('Related questions'), @@ -221,7 +221,7 @@ class ParagraphView(APIView): tags=[_('Knowledge Base/Documentation/Paragraph')] ) @has_permissions(PermissionConstants.DOCUMENT_EDIT.get_workspace_permission()) - def put(self, request: Request, + def get(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str, paragraph_id: str, problem_id: str): return result.success(ParagraphSerializers.Association( data={