From 0063b0cf4feeacff7a0659b503ac6258ea96bcfa Mon Sep 17 00:00:00 2001 From: Shim Kyumin Date: Wed, 7 Aug 2024 15:46:39 +0900 Subject: [PATCH] =?UTF-8?q?style:=20=EC=9D=91=EB=8B=B5=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- friends/views.py | 2 +- restaurants/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/friends/views.py b/friends/views.py index c17a372..121f247 100644 --- a/friends/views.py +++ b/friends/views.py @@ -41,7 +41,7 @@ def friend_restaurant_list(request, id): serializer = RestaurantlistSerializer(restaurants, many=True) - return Response({"results": serializer.data}, status=status.HTTP_200_OK) + return Response(serializer.data, status=status.HTTP_200_OK) except User.DoesNotExist: return Response( {"message": "Friend not found"}, status=status.HTTP_404_NOT_FOUND diff --git a/restaurants/views.py b/restaurants/views.py index 65018e7..42251dc 100644 --- a/restaurants/views.py +++ b/restaurants/views.py @@ -111,7 +111,7 @@ def user_restaurant_list(request): restaurant_ids = user_restaurants.values_list("restaurant_id", flat=True) restaurants = Restaurant.objects.filter(id__in=restaurant_ids) serializer = RestaurantlistSerializer(restaurants, many=True) - return Response({"results": serializer.data}, status=status.HTTP_200_OK) + return Response(serializer.data, status=status.HTTP_200_OK) except User.DoesNotExist: return Response( {"message": "Default user not found"}, status=status.HTTP_404_NOT_FOUND