From 497f81e5ab682d8d7d721d1e66a3d9162684fe3d Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Tue, 20 Mar 2018 19:14:45 +0100
Subject: [PATCH] Typo in returned api payload

---
 api/funkwhale_api/playlists/views.py | 2 +-
 api/tests/playlists/test_views.py    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/api/funkwhale_api/playlists/views.py b/api/funkwhale_api/playlists/views.py
index dc3475fab0..797f756787 100644
--- a/api/funkwhale_api/playlists/views.py
+++ b/api/funkwhale_api/playlists/views.py
@@ -43,7 +43,7 @@ class PlaylistViewSet(
         serializer = serializers.PlaylistTrackSerializer(plts, many=True)
         data = {
             'count': len(plts),
-            'result': serializer.data
+            'results': serializer.data
         }
         return Response(data, status=200)
 
diff --git a/api/tests/playlists/test_views.py b/api/tests/playlists/test_views.py
index 03babfabb5..df7d04a216 100644
--- a/api/tests/playlists/test_views.py
+++ b/api/tests/playlists/test_views.py
@@ -152,4 +152,4 @@ def test_can_list_tracks_from_playlist(
     serialized_plt = serializers.PlaylistTrackSerializer(plt).data
 
     assert response.data['count'] == 1
-    assert response.data['result'][0] == serialized_plt
+    assert response.data['results'][0] == serialized_plt
-- 
GitLab