diff --git a/apps/knowledge/views/document.py b/apps/knowledge/views/document.py index b2e61b3c0..1659a18c9 100644 --- a/apps/knowledge/views/document.py +++ b/apps/knowledge/views/document.py @@ -6,7 +6,7 @@ from rest_framework.views import APIView from common.auth import TokenAuth from common.auth.authentication import has_permissions -from common.constants.permission_constants import PermissionConstants, CompareConstants +from common.constants.permission_constants import PermissionConstants from common.result import result from knowledge.api.document import DocumentSplitAPI, DocumentBatchAPI, DocumentBatchCreateAPI, DocumentCreateAPI, \ DocumentReadAPI, DocumentEditAPI, DocumentDeleteAPI, TableDocumentCreateAPI, QaDocumentCreateAPI, \ diff --git a/apps/knowledge/views/paragraph.py b/apps/knowledge/views/paragraph.py index f7fcb9a9b..439949b93 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.KNOWLEDGE_PARAGRAPH_EDIT.get_workspace_permission()) - def get(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str): + def put(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str): return result.success(ParagraphSerializers.Association( data={ 'workspace_id': workspace_id, @@ -231,7 +231,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 @@ -240,7 +240,7 @@ class ParagraphView(APIView): tags=[_('Knowledge Base/Documentation/Paragraph')] # type: ignore ) @has_permissions(PermissionConstants.KNOWLEDGE_PARAGRAPH_EDIT.get_workspace_permission()) - def get(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str): + def put(self, request: Request, workspace_id: str, knowledge_id: str, document_id: str): return result.success(ParagraphSerializers.Association( data={ 'workspace_id': workspace_id,