Merge pull request 'refactor(meetings): change UserAppointmentStatsView from GET to POST' (#38) from feature/meetings into main
Reviewed-on: https://gitea.blackbusinesslabs.com/ATTUNE-HEART-THERAPY/alternative-backend-service/pulls/38
This commit is contained in:
commit
577e87d8db
@ -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