Revision: change the shape of the list response.

This commit is contained in:
Tom Hacohen 2020-04-16 17:38:07 +03:00
parent 9f0f00a594
commit af27871955

View File

@ -191,7 +191,10 @@ class CollectionItemViewSet(BaseViewSet):
col_it = get_object_or_404(col.items, uid=uid) col_it = get_object_or_404(col.items, uid=uid)
serializer = CollectionItemRevisionSerializer(col_it.revisions.order_by('-id'), many=True) serializer = CollectionItemRevisionSerializer(col_it.revisions.order_by('-id'), many=True)
return Response(serializer.data) ret = {
'data': serializer.data,
}
return Response(ret)
@action_decorator(detail=False, methods=['POST']) @action_decorator(detail=False, methods=['POST'])
def bulk_get(self, request, collection_uid=None): def bulk_get(self, request, collection_uid=None):