Skip to content

Commit 6f81d80

Browse files
committed
fix: change HTTP methods from GET to PUT for disassociation and related questions endpoints
1 parent a5fb2e1 commit 6f81d80

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/knowledge/views/paragraph.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class UnAssociation(APIView):
207207
authentication_classes = [TokenAuth]
208208

209209
@extend_schema(
210-
methods=['GET'],
210+
methods=['PUT'],
211211
summary=_('Disassociation issue'),
212212
description=_('Disassociation issue'),
213213
operation_id=_('Disassociation issue'), # type: ignore
@@ -216,7 +216,7 @@ class UnAssociation(APIView):
216216
tags=[_('Knowledge Base/Documentation/Paragraph')] # type: ignore
217217
)
218218
@has_permissions(PermissionConstants.DOCUMENT_EDIT.get_workspace_permission())
219-
def get(self, request: Request,
219+
def put(self, request: Request,
220220
workspace_id: str, knowledge_id: str, document_id: str, paragraph_id: str, problem_id: str):
221221
return result.success(ParagraphSerializers.Association(
222222
data={
@@ -232,7 +232,7 @@ class Association(APIView):
232232
authentication_classes = [TokenAuth]
233233

234234
@extend_schema(
235-
methods=['GET'],
235+
methods=['PUT'],
236236
summary=_('Related questions'),
237237
description=_('Related questions'),
238238
operation_id=_('Related questions'), # type: ignore
@@ -241,7 +241,7 @@ class Association(APIView):
241241
tags=[_('Knowledge Base/Documentation/Paragraph')] # type: ignore
242242
)
243243
@has_permissions(PermissionConstants.DOCUMENT_EDIT.get_workspace_permission())
244-
def get(self, request: Request,
244+
def put(self, request: Request,
245245
workspace_id: str, knowledge_id: str, document_id: str, paragraph_id: str, problem_id: str):
246246
return result.success(ParagraphSerializers.Association(
247247
data={

0 commit comments

Comments
 (0)