Fix no content in spotify
This commit is contained in:
parent
a237aa3e82
commit
22e9cf9a1f
2 changed files with 2 additions and 1 deletions
|
@ -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]:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue