From 1373151bea45a461f97de72bfb464c6299a0265d Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Thu, 14 Apr 2022 23:41:46 +0200 Subject: [PATCH] Patch: Spotify Url --- app/Utils/SongUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Utils/SongUtils.ts b/app/Utils/SongUtils.ts index 3ea327c..ffc159c 100644 --- a/app/Utils/SongUtils.ts +++ b/app/Utils/SongUtils.ts @@ -155,7 +155,7 @@ export async function fetchTopTracks(range: Range) { if (await Redis.exists(`spotify:top:tracks:${range}`)) return JSON.parse(await Redis.get(`spotify:top:tracks:${range}`) || '{}') - const fetched_tracks = await RequestWrapper<{ items: Item[] }>(`https://api.spotify.com/v1/me/top/tracks?limit=10?range=${getTermForRange(range)}`) + const fetched_tracks = await RequestWrapper<{ items: Item[] }>(`https://api.spotify.com/v1/me/top/tracks?limit=10&time_range=${getTermForRange(range)}`) const tracks: SpotifyTrack[] = [] @@ -200,7 +200,7 @@ export async function fetchTopArtist(range: Range): Promise(`https://api.spotify.com/v1/me/top/artists?limit=10?range=${getTermForRange(range)}`) + const fetched_artists = await RequestWrapper<{ items: Artist[] }>(`https://api.spotify.com/v1/me/top/artists&time_range=10?range=${getTermForRange(range)}`) const artists: SpotifyArtist[] = []