mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:02:46 +00:00
feat: implement Paragraph API for CRUD operations and batch deletion
This commit is contained in:
parent
10105ce5ab
commit
36da813eea
|
|
@ -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={
|
||||
|
|
|
|||
Loading…
Reference in New Issue