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