Change invitations to also follow our list return type format.

This commit is contained in:
Tom Hacohen 2020-05-27 17:14:38 +03:00
parent 89b47c67b7
commit 64b947d455

View File

@ -123,6 +123,17 @@ class BaseViewSet(viewsets.ModelViewSet):
return queryset, new_stoken
# Change how our list works by default
def list(self, request, collection_uid=None):
queryset = self.get_queryset()
serializer = self.get_serializer(queryset, many=True)
ret = {
'data': serializer.data,
}
return Response(ret)
class CollectionViewSet(BaseViewSet):
allowed_methods = ['GET', 'POST', 'DELETE']