diff --git a/care/abdm/api/viewsets/consent.py b/care/abdm/api/viewsets/consent.py index eda7b2f47b..7315b1a1ca 100644 --- a/care/abdm/api/viewsets/consent.py +++ b/care/abdm/api/viewsets/consent.py @@ -140,30 +140,6 @@ def fetch(self, request, pk): ConsentRequestSerializer(consent).data, status=status.HTTP_200_OK ) - def list(self, request, *args, **kwargs): - if ratelimit(request, "consent__list", [request.user.username]): - raise CaptchaRequiredException( - detail={ - "status": 429, - "detail": f"Request limit reached. Try after {USER_READABLE_RATE_LIMIT_TIME}", - }, - code=status.HTTP_429_TOO_MANY_REQUESTS, - ) - - return super().list(request, *args, **kwargs) - - def retrieve(self, request, *args, **kwargs): - if ratelimit(request, "consent__retrieve", [kwargs["pk"]]): - raise CaptchaRequiredException( - detail={ - "status": 429, - "detail": f"Request limit reached. Try after {USER_READABLE_RATE_LIMIT_TIME}", - }, - code=status.HTTP_429_TOO_MANY_REQUESTS, - ) - - return super().retrieve(request, *args, **kwargs) - class ConsentCallbackViewSet(GenericViewSet): permission_classes = (IsAuthenticated,) diff --git a/care/abdm/api/viewsets/health_information.py b/care/abdm/api/viewsets/health_information.py index f6233b026e..7f28b84945 100644 --- a/care/abdm/api/viewsets/health_information.py +++ b/care/abdm/api/viewsets/health_information.py @@ -23,15 +23,6 @@ class HealthInformationViewSet(GenericViewSet): permission_classes = (IsAuthenticated,) def retrieve(self, request, pk): - if ratelimit(request, "health_information__retrieve", [pk]): - raise CaptchaRequiredException( - detail={ - "status": 429, - "detail": f"Request limit reached. Try after {USER_READABLE_RATE_LIMIT_TIME}", - }, - code=status.HTTP_429_TOO_MANY_REQUESTS, - ) - files = FileUpload.objects.filter( Q(internal_name=f"{pk}.json") | Q(associating_id=pk), file_type=FileUpload.FileType.ABDM_HEALTH_INFORMATION.value,