diff --git a/pretix_wallet/pagination.py b/pretix_wallet/pagination.py index 656b113..9eec052 100644 --- a/pretix_wallet/pagination.py +++ b/pretix_wallet/pagination.py @@ -14,7 +14,7 @@ def get_paginated_response(self, data): }) -class TerminalMetadataPagination(pagination.PageNumberPagination): +class ProductPagination(pagination.PageNumberPagination): def get_paginated_response(self, data): return Response({ 'links': { @@ -23,9 +23,6 @@ def get_paginated_response(self, data): }, 'count': self.page.paginator.count, 'data': { - "id": "coffee_machine", - "friendly_name": "Kaffeemaschine", - "permission": "debit", "products": data, } }) diff --git a/pretix_wallet/views.py b/pretix_wallet/views.py index 490d025..4b3a133 100644 --- a/pretix_wallet/views.py +++ b/pretix_wallet/views.py @@ -16,7 +16,7 @@ from pretix_wallet.auth import TerminalAuthentication, TerminalPermission from pretix_wallet.models import CustomerWallet -from pretix_wallet.pagination import CustomPagination, TerminalMetadataPagination +from pretix_wallet.pagination import CustomPagination, ProductPagination from pretix_wallet.serializers import ProductSerializer, WalletSerializer, TransactionSerializer @@ -78,7 +78,7 @@ def post(self, request, *args, **kwargs): class ProductViewSet(TerminalAuthMixin, ReadOnlyModelViewSet): serializer_class = ProductSerializer - pagination_class = TerminalMetadataPagination + pagination_class = ProductPagination def get_queryset(self): return Item.objects.all()