diff --git a/meetings/views.py b/meetings/views.py index b825749..cfd2c75 100644 --- a/meetings/views.py +++ b/meetings/views.py @@ -176,9 +176,10 @@ class AppointmentStatsView(generics.GenericAPIView): class UserAppointmentStatsView(generics.GenericAPIView): permission_classes = [IsAuthenticated] - def get(self, request): + def post(self, request): + email = request.data.get('email') stats = AppointmentRequest.objects.filter( - email=request.user.email + email=email ).aggregate( total=Count('id'), pending=Count('id', filter=Q(status='pending_review')),