Files
eggs-backend/core/apps/eggs/views/benefit.py
husanjon ab73d05ecc
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
gold eggs backend
2026-04-15 08:59:36 +02:00

12 lines
317 B
Python

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)