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