Fix no content in spotify

This commit is contained in:
unknown 2025-04-05 18:35:28 +03:00
parent a237aa3e82
commit 22e9cf9a1f
2 changed files with 2 additions and 1 deletions

View file

@ -70,6 +70,8 @@ class SpotifyStrategy(MusicProviderStrategy):
}
async with aiohttp.ClientSession() as session:
resp = await session.get(f'https://api.spotify.com/v1{endpoint}', headers=user_headers)
if resp.status != 200:
return None
return await resp.json()
async def get_tracks(self, token) -> list[Track]:

View file

@ -63,7 +63,6 @@ async def spotify_callback(code: str, state: str, session: AsyncSession = Depend
except:
raise LinkException()
token, refresh_token, expires_in = await get_spotify_token(code)
user = await session.get(User, user_id)
if user: