dev: rest framework throttling (#4534)

This commit is contained in:
Nikhil 2024-05-21 15:03:01 +05:30 committed by GitHub
parent 4feec35773
commit 410f04c327
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 67 additions and 3 deletions

View file

@ -32,7 +32,7 @@ from plane.authentication.adapter.error import (
AuthenticationException,
AUTHENTICATION_ERROR_CODES,
)
from plane.authentication.rate_limit import AuthenticationThrottle
def generate_password_token(user):
uidb64 = urlsafe_base64_encode(smart_bytes(user.id))
@ -46,6 +46,10 @@ class ForgotPasswordEndpoint(APIView):
AllowAny,
]
throttle_classes = [
AuthenticationThrottle,
]
def post(self, request):
email = request.data.get("email")