Remove basic option from api view

This commit is contained in:
Paweł Jastrzębski 2022-05-12 12:40:33 +02:00
parent d9bbeea892
commit b7f2e9cfe6

View File

@ -28,7 +28,6 @@ class DashboardApiView(ApiTokenRequiredMixin, DateRangeMixin, View):
if uuid and is_valid_uuid(uuid):
services = services.filter(uuid=uuid)
basic = request.GET.get('basic', '0').lower() in ('1', 'true')
try:
start = self.get_start_date()
end = self.get_end_date()
@ -40,12 +39,11 @@ class DashboardApiView(ApiTokenRequiredMixin, DateRangeMixin, View):
'name': s.name,
'uuid': s.uuid,
'link': s.link,
'stats': s.get_core_stats(start, end, basic),
'stats': s.get_core_stats(start, end),
}
for s in services
]
if not basic:
services_data = self._convert_querysets_to_lists(services_data)
return JsonResponse(data={'services': services_data})