mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-28 23:32:48 +00:00
fix: change HTTP methods from GET to PUT for disassociation and related questions endpoints
This commit is contained in:
parent
a5fb2e15c6
commit
6f81d80389
|
|
@ -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={
|
||||
|
|
|
|||
Loading…
Reference in New Issue