Skip to content

Commit

Permalink
remove terminal metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
jeriox committed Mar 27, 2024
1 parent 367ba06 commit ffed9c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions pretix_wallet/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand All @@ -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,
}
})
4 changes: 2 additions & 2 deletions pretix_wallet/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit ffed9c1

Please sign in to comment.