From f8e33cf400730dce6f5e4a5df22d41f06b8d35a4 Mon Sep 17 00:00:00 2001 From: through-your-tears Date: Sun, 7 Apr 2024 09:24:44 +0300 Subject: [PATCH] =?UTF-8?q?=D0=91=D0=B0=D0=B3=20=D1=84=D0=B8=D0=BA=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/business/views.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/business/views.py b/src/business/views.py index 03ba238..0c0116a 100644 --- a/src/business/views.py +++ b/src/business/views.py @@ -9,7 +9,7 @@ from rest_framework.views import APIView from core.permissions import IsOrganizationOwner from .repositories import QRCodeUsingRepository, OrganizationAccountRepository -from .serializers import DetailedUsingQRCodeSerializer, ListUsingQRCodeSerializer, OrganizationAccount +from .serializers import DetailedUsingQRCodeSerializer, ListUsingQRCodeSerializer, OrganizationAccountSerializer from .services import qr_prove # Create your views here. @@ -74,20 +74,21 @@ class QrCodeProveAPIView(APIView): class OrganizationAccountCreateAPIView(CreateAPIView): - serializer_class = OrganizationAccount + serializer_class = OrganizationAccountSerializer permission_classes = [IsOrganizationOwner] queryset = OrganizationAccountRepository.all() class OrganizationAccountDestroyAPIView(DestroyAPIView): - serializer_class = OrganizationAccount + serializer_class = OrganizationAccountSerializer permission_classes = [IsOrganizationOwner] queryset = OrganizationAccountRepository.all() class OrganizationAccountsListAPIView(ListAPIView): - serializer_class = OrganizationAccount + serializer_class = OrganizationAccountSerializer permission_classes = [IsOrganizationOwner] + pagination_class = PageNumberPagination def get_queryset(self): pk = self.kwargs.get('id')