This commit is contained in:
alorig
2025-11-22 17:52:05 +05:00
parent abd5518cf1
commit c54ecd47fe
2 changed files with 9 additions and 1 deletions

View File

@@ -82,8 +82,15 @@ class IntegrationViewSet(SiteSectorModelViewSet):
)
from rest_framework.permissions import AllowAny
from rest_framework.throttling import BaseThrottle
@action(detail=False, methods=['post'], url_path='test-connection', permission_classes=[AllowAny])
class NoThrottle(BaseThrottle):
"""Temporary throttle class that allows all requests"""
def allow_request(self, request, view):
return True
@action(detail=False, methods=['post'], url_path='test-connection',
permission_classes=[AllowAny], throttle_classes=[NoThrottle])
def test_connection_collection(self, request):
"""
Collection-level test connection endpoint for frontend convenience.