refactor(meetings): change UserAppointmentStatsView from GET to POST #38
@ -176,9 +176,10 @@ class AppointmentStatsView(generics.GenericAPIView):
|
|||||||
class UserAppointmentStatsView(generics.GenericAPIView):
|
class UserAppointmentStatsView(generics.GenericAPIView):
|
||||||
permission_classes = [IsAuthenticated]
|
permission_classes = [IsAuthenticated]
|
||||||
|
|
||||||
def get(self, request):
|
def post(self, request):
|
||||||
|
email = request.data.get('email')
|
||||||
stats = AppointmentRequest.objects.filter(
|
stats = AppointmentRequest.objects.filter(
|
||||||
email=request.user.email
|
email=email
|
||||||
).aggregate(
|
).aggregate(
|
||||||
total=Count('id'),
|
total=Count('id'),
|
||||||
pending=Count('id', filter=Q(status='pending_review')),
|
pending=Count('id', filter=Q(status='pending_review')),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user