From 7bda3fd9053bc92734b580da857ecd67034e2a18 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 24 Mar 2026 12:24:57 +0000 Subject: [PATCH] fix: correct dict key syntax in FeaturedEventsAPI and TopEventsAPI responses --- mobile_api/views/events.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mobile_api/views/events.py b/mobile_api/views/events.py index 27ada07..d795e7f 100644 --- a/mobile_api/views/events.py +++ b/mobile_api/views/events.py @@ -390,9 +390,9 @@ class FeaturedEventsAPI(APIView): data_dict['thumb_img'] = '' event_list.append(data_dict) - return JsonResponse({status: success, events: event_list}) + return JsonResponse({"status": "success", "events": event_list}) except Exception as e: - return JsonResponse({status: error, message: str(e)}) + return JsonResponse({"status": "error", "message": str(e)}) @method_decorator(csrf_exempt, name='dispatch') @@ -416,6 +416,6 @@ class TopEventsAPI(APIView): data_dict['thumb_img'] = '' event_list.append(data_dict) - return JsonResponse({status: success, events: event_list}) + return JsonResponse({"status": "success", "events": event_list}) except Exception as e: - return JsonResponse({status: error, message: str(e)}) + return JsonResponse({"status": "error", "message": str(e)})