diff --git a/apps/core/urls.py b/apps/core/urls.py index 5a868f1..5af4eeb 100644 --- a/apps/core/urls.py +++ b/apps/core/urls.py @@ -5,6 +5,6 @@ app_name = "core" urlpatterns = [ path('', HomeView.as_view(), name='home'), - path('charge//', ChargeView.as_view(), name='charge'), - path('api/charge_create', ChargeRequestApiView.as_view(), name='charge_create_api'), + # path('charge//', ChargeView.as_view(), name='charge'), + # path('api/charge_create', ChargeRequestApiView.as_view(), name='charge_create_api'), ] diff --git a/apps/wallet/views/application.py b/apps/wallet/views/application.py index ad26522..8078637 100755 --- a/apps/wallet/views/application.py +++ b/apps/wallet/views/application.py @@ -76,8 +76,7 @@ class TransactionDetailAPIView(generics.RetrieveAPIView): serializer_class = TransactionSerializer lookup_field = 'uuid' filter_backends = (DjangoFilterBackend,) - filterset_class = AccountFilter - permission_classes = [TokenHasScope] + permission_classes = [IsAuthenticatedOrTokenHasScope] required_scopes = ['wallet.application:get_transaction_detail'] queryset = Transaction.objects.all() @@ -86,11 +85,11 @@ class TransactionDetailAPIView(generics.RetrieveAPIView): application = get_application(self.request) return Transaction.objects.filter(Q(application=application) | - Q(payer_wallet__owner_uuid=application.pk, - payer_wallet__owner_type=TypeChoices.APPLICATION, + Q(payer_account__owner_uuid=application.pk, + payer_account__owner_type=TypeChoices.APPLICATION, ) | - Q(payee_wallet__owner_uuid=application.pk, - payee_wallet__owner_type=TypeChoices.APPLICATION, + Q(payee_account__owner_uuid=application.pk, + payee_account__owner_type=TypeChoices.APPLICATION, ) ).all() @@ -109,10 +108,10 @@ class TransactionListAPIView(generics.ListAPIView): application = get_application(self.request) return qs.filter(Q(application=application) | - Q(payer_wallet__owner_uuid=application.pk, - payer_wallet__owner_type=TypeChoices.APPLICATION) | - Q(payee_wallet__owner_uuid=application.pk, - payee_wallet__owner_type=TypeChoices.APPLICATION, + Q(payer_account__owner_uuid=application.pk, + payer_account__owner_type=TypeChoices.APPLICATION) | + Q(payee_account__owner_uuid=application.pk, + payee_account__owner_type=TypeChoices.APPLICATION, ) ).all()