mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: make module create and list endpoint response structure simillar (#2524)
This commit is contained in:
parent
55b2927a17
commit
c8f98a9bc2
@ -149,6 +149,9 @@ class ModuleViewSet(BaseViewSet):
|
|||||||
|
|
||||||
if serializer.is_valid():
|
if serializer.is_valid():
|
||||||
serializer.save()
|
serializer.save()
|
||||||
|
|
||||||
|
module = Module.objects.get(pk=serializer.data["id"])
|
||||||
|
serializer = ModuleSerializer(module)
|
||||||
return Response(serializer.data, status=status.HTTP_201_CREATED)
|
return Response(serializer.data, status=status.HTTP_201_CREATED)
|
||||||
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user