gold eggs backend
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
This commit is contained in:
11
core/apps/eggs/views/benefit.py
Normal file
11
core/apps/eggs/views/benefit.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from django.http import JsonResponse
|
||||
from rest_framework.views import APIView
|
||||
|
||||
from core.apps.eggs.models import Party
|
||||
|
||||
|
||||
class MonthlyBenefitView(APIView):
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
monthly_benefit = Party.get_total_benefit()
|
||||
return JsonResponse(list(monthly_benefit), safe=False)
|
||||
Reference in New Issue
Block a user