From ffed9c1df8d0e75ce15b4bdf5e7cd7176fb9a19d Mon Sep 17 00:00:00 2001 From: Julian B Date: Wed, 27 Mar 2024 17:02:00 +0100 Subject: [PATCH] remove terminal metadata --- pretix_wallet/pagination.py | 5 +---- pretix_wallet/views.py | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) 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()