chore: add rate limiting in magic generate endpoint (#5322)

This commit is contained in:
Nikhil
2024-08-07 19:35:00 +05:30
committed by GitHub
parent 86909cff14
commit 520938ab5c
@@ -29,6 +29,7 @@ from plane.authentication.adapter.error import (
AuthenticationException,
AUTHENTICATION_ERROR_CODES,
)
from plane.authentication.rate_limit import AuthenticationThrottle
class MagicGenerateEndpoint(APIView):
@@ -37,6 +38,10 @@ class MagicGenerateEndpoint(APIView):
AllowAny,
]
throttle_classes = [
AuthenticationThrottle,
]
def post(self, request):
# Check if instance is configured
instance = Instance.objects.first()