refactor(meetings): change UserAppointmentStatsView from GET to POST #38
@ -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')),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user