fix: never_cache sync wrapper broke async dispatch - add async_never_cache_dispatch (wallet/login_record/tasks)
This commit is contained in:
@@ -6,6 +6,7 @@ from django.utils.decorators import method_decorator
|
||||
from django.views.decorators.cache import never_cache
|
||||
from datetime import timedelta
|
||||
|
||||
from utils.async_decorators import async_never_cache_dispatch
|
||||
from utils.response_codes import (
|
||||
ResponseCode,
|
||||
create_standardized_response,
|
||||
@@ -18,7 +19,7 @@ from drf_yasg import openapi
|
||||
from chunyu_project.common_schemas import success_response, error_response, unauthorized_response, not_found_response
|
||||
|
||||
|
||||
@method_decorator(never_cache, name='dispatch')
|
||||
@async_never_cache_dispatch
|
||||
class LoginRecordListAPIView(APIView):
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
@@ -87,7 +88,7 @@ class LoginRecordListAPIView(APIView):
|
||||
)
|
||||
|
||||
|
||||
@method_decorator(never_cache, name='dispatch')
|
||||
@async_never_cache_dispatch
|
||||
class LoginRecordDeleteAPIView(APIView):
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
@@ -117,7 +118,7 @@ class LoginRecordDeleteAPIView(APIView):
|
||||
)
|
||||
|
||||
|
||||
@method_decorator(never_cache, name='dispatch')
|
||||
@async_never_cache_dispatch
|
||||
class LoginRecordClearAPIView(APIView):
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user