From 6cd87239621f859eae1db37d4522499cae46b2d9 Mon Sep 17 00:00:00 2001 From: Ryan Freeman Date: Thu, 10 Apr 2025 22:21:29 +0100 Subject: [PATCH] Fix type issue with spotify.ts --- lib/spotify.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/spotify.ts b/lib/spotify.ts index b5dd0ae..6b7f334 100644 --- a/lib/spotify.ts +++ b/lib/spotify.ts @@ -45,13 +45,8 @@ export const getCurrentlyPlaying = async () => { export const getRecentlyPlayed = async () => { - try { - const {access_token}: Response = await getAccessToken() as Response - } catch(e) { - console.error(e) - return null - } - + const {access_token}: Response = await getAccessToken() as Response + return await fetch(SPOTIFY_RECENTLY_PLAYED, { headers: { Authorization: `Bearer ${access_token}`