diff --git a/backend/endpoints/spotify_api.py b/backend/endpoints/spotify_api.py index 2507e91..8c8ce99 100644 --- a/backend/endpoints/spotify_api.py +++ b/backend/endpoints/spotify_api.py @@ -54,7 +54,7 @@ def search(query: str): "Authorization": "Bearer " + SessionManager.instance().get_current_session().access_tokens, "Content-Type": "application/json" } - return requests.get(url, headers=header) + return requests.get(url, headers=header).json() except Exception as e: print(e) @@ -66,7 +66,7 @@ def play(song_id: str): "Authorization": "Bearer " + SessionManager.instance().get_current_session().access_tokens, "Content-Type": "application/json" } - requests.put(url, data=body, headers=header) + requests.put(url, data=body, headers=header).json() @music_router.get("/current-song") def current_song(): @@ -75,5 +75,5 @@ def current_song(): "Authorization": "Bearer " + SessionManager.instance().get_current_session().access_tokens, "Content-Type": "application/json" } - return requests.get(url, headers=header) + return requests.get(url, headers=header).json()