This commit is contained in:
Spitap
2023-02-01 12:16:44 +01:00
parent cbfac68b97
commit bee1342f4d
7 changed files with 72 additions and 16 deletions
+3 -2
View File
@@ -12,11 +12,12 @@ from drf_spectacular.utils import extend_schema
from rest_framework import response, status
from rest_framework_simplejwt import views as jwt_views
from rest_framework_simplejwt.exceptions import InvalidToken, TokenError
from rest_framework.throttling import ScopedRateThrottle, UserRateThrottle
from rest_framework.throttling import ScopedRateThrottle
from rest_framework.views import APIView
from modoboa.core.password_hashers import get_password_hasher
from modoboa.core.utils import check_for_updates
from modoboa.lib.throttle import UserLesserDdosUser
from modoboa.parameters import tools as param_tools
from smtplib import SMTPException
@@ -178,7 +179,7 @@ class PasswordResetConfirmView(APIView):
class ComponentsInformationAPIView(APIView):
"""Retrieve information about installed components."""
throttle_classes = [UserRateThrottle]
throttle_classes = [UserLesserDdosUser]
@extend_schema(responses=serializers.ModoboaComponentSerializer(many=True))
def get(self, request, *args, **kwargs):