mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 13:07:59 +01:00
Fixed mobile api endpoints
This commit is contained in:
parent
f34000b100
commit
3c0e922b28
1 changed files with 6 additions and 7 deletions
|
@ -33,7 +33,11 @@ class TracksController extends Controller
|
|||
->listed()
|
||||
->explicitFilter()
|
||||
->published()
|
||||
->with('user', 'genre', 'cover', 'album', 'album.user')->take(10);
|
||||
->with('user', 'genre', 'cover', 'album', 'album.user')->take(10)->get();
|
||||
|
||||
$tracks = $tracks->map(function(Track $track) {
|
||||
return Track::mapPublicTrackSummary($track);
|
||||
});
|
||||
|
||||
$json = [
|
||||
'total_tracks' => $tracks->count(),
|
||||
|
@ -45,12 +49,7 @@ class TracksController extends Controller
|
|||
|
||||
public function popular()
|
||||
{
|
||||
$tracks = Track::popular(10)
|
||||
->userDetails()
|
||||
->listed()
|
||||
->explicitFilter()
|
||||
->published()
|
||||
->with('user', 'genre', 'cover', 'album', 'album.user')->take(10);
|
||||
$tracks = collect(Track::popular(10));
|
||||
|
||||
$json = [
|
||||
'total_tracks' => $tracks->count(),
|
||||
|
|
Loading…
Reference in a new issue