feat: update Problem API to batch process request data in post method
parent
a90f6c89cb
commit
906407a15b
|
|
@ -50,8 +50,8 @@ class ProblemView(APIView):
|
||||||
@has_permissions(PermissionConstants.DOCUMENT_EDIT.get_workspace_permission())
|
@has_permissions(PermissionConstants.DOCUMENT_EDIT.get_workspace_permission())
|
||||||
def post(self, request: Request, workspace_id: str, knowledge_id: str):
|
def post(self, request: Request, workspace_id: str, knowledge_id: str):
|
||||||
return result.success(ProblemSerializers.Create(
|
return result.success(ProblemSerializers.Create(
|
||||||
data={'workspace_id': workspace_id, 'knowledge_id': knowledge_id, 'problem_list': request.data}
|
data={'workspace_id': workspace_id, 'knowledge_id': knowledge_id}
|
||||||
).batch())
|
).batch(request.data))
|
||||||
|
|
||||||
class Paragraph(APIView):
|
class Paragraph(APIView):
|
||||||
authentication_classes = [TokenAuth]
|
authentication_classes = [TokenAuth]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue