refactor code

This commit is contained in:
daovietanh99 2024-02-22 09:06:41 +07:00
parent aefebbb984
commit 63aa41cd9f

View File

@ -341,7 +341,7 @@ class AccuracyViewSet(viewsets.ViewSet):
location=OpenApiParameter.QUERY,
description='Start date (YYYY-mm-DDTHH:MM:SSZ)',
type=OpenApiTypes.DATE,
default='2023-01-02T00:00:00+0700',
default='2024-01-02T00:00:00+0700',
),
OpenApiParameter(
name='end_date',
@ -546,8 +546,6 @@ class AccuracyViewSet(viewsets.ViewSet):
return response
return JsonResponse({'error': 'Invalid request method.'}, status=405)
class RequestViewSet(viewsets.ViewSet):
lookup_field = "username"
@extend_schema(
request={
@ -562,7 +560,7 @@ class RequestViewSet(viewsets.ViewSet):
},
},
responses=None,
tags=['Request']
tags=['Accuracy']
)
@action(detail=False, url_path=r"request/(?P<request_id>[\w\-]+)", methods=["GET", "POST"])
def get_subscription_request(self, request, request_id=None):