From 95a7e972559cd0fadf2696cf4abd9cc1d1c80098 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Thu, 14 Apr 2022 23:47:06 +0200 Subject: [PATCH] Debug --- app/Utils/SongUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Utils/SongUtils.ts b/app/Utils/SongUtils.ts index ffc159c..0a070da 100644 --- a/app/Utils/SongUtils.ts +++ b/app/Utils/SongUtils.ts @@ -160,6 +160,7 @@ export async function fetchTopTracks(range: Range) { const tracks: SpotifyTrack[] = [] if (fetched_tracks) { + console.log(fetched_tracks.data.items) for (const track of fetched_tracks.data.items) { tracks.push({ author: track.artists.map(artist => artist.name).join(', ') || '', @@ -200,7 +201,7 @@ export async function fetchTopArtist(range: Range): Promise(`https://api.spotify.com/v1/me/top/artists&time_range=10?range=${getTermForRange(range)}`) + const fetched_artists = await RequestWrapper<{ items: Artist[] }>(`https://api.spotify.com/v1/me/top/artists?limit=10&time_range=${getTermForRange(range)}`) const artists: SpotifyArtist[] = []