aggiunta .json() nei return degli endpoint
This commit is contained in:
parent
564a2a4b9a
commit
502959d83b
1 changed files with 3 additions and 3 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue