From ce3b0b77f515b96bd9405df6a5dd231cd5ee621e Mon Sep 17 00:00:00 2001 From: saani Date: Wed, 26 Nov 2025 16:20:40 +0000 Subject: [PATCH] feat(api): change user appointment stats endpoint to POST method Changed the user_appointment_stats endpoint from GET to POST method and added email as a required field. This change allows for more flexible querying of appointment statistics by requiring user email in the request body rather than URL parameters. BREAKING CHANGE: The /api/meetings/user/appointments/stats/ endpoint now accepts POST requests instead of GET and requires an email field in the request body. --- booking_system/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/booking_system/views.py b/booking_system/views.py index c91da5b..c75db95 100644 --- a/booking_system/views.py +++ b/booking_system/views.py @@ -297,8 +297,9 @@ def api_root(request, format=None): "user_appointment_stats": { "description": "Get appointment statistics and analytics for the authenticated user", "url": request.build_absolute_uri("/api/meetings/user/appointments/stats/"), - "methods": ["GET"], + "methods": ["POST"], "authentication": "Required", + "required_fields": ["email"], "response_fields": { "total_requests": "Total number of appointment requests", "pending_review": "Number of pending review requests", -- 2.39.5