diff --git a/app/public/js/common/SCapiService.js b/app/public/js/common/SCapiService.js index a759c992..5a243e4c 100644 --- a/app/public/js/common/SCapiService.js +++ b/app/public/js/common/SCapiService.js @@ -208,7 +208,7 @@ app.service('SCapiService', function ($http, $window, $q, $log, $state, $statePa return response.data.collection.concat(next_href_response.collection); }) } else { - return response.data; + return response.data.collection; } } else { // invalid response diff --git a/app/public/js/stream/streamCtrl.js b/app/public/js/stream/streamCtrl.js index 06a3a9c1..b2a424f8 100644 --- a/app/public/js/stream/streamCtrl.js +++ b/app/public/js/stream/streamCtrl.js @@ -53,7 +53,7 @@ app.controller('StreamCtrl', function ($scope, SCapiService, $rootScope) { var track = tracksData[i].origin; if (track.hasOwnProperty('user_favorite')) - track.user_favorite = ($scope.likes.collection.indexOf(track.id) != -1); + track.user_favorite = ($scope.likes.indexOf(track.id) != -1); } }