Fixed get favorite tracks

This commit is contained in:
RemixDev 2022-03-09 11:22:14 +01:00
parent 0f9362c6ca
commit 79d602a490
2 changed files with 2 additions and 3 deletions

View File

@ -17,7 +17,7 @@ const handler: ApiHandler['handler'] = async (req, res) => {
result.playlists = await dz.gw.get_user_playlists(userID, { limit: -1 }) result.playlists = await dz.gw.get_user_playlists(userID, { limit: -1 })
result.albums = await dz.gw.get_user_albums(userID, { limit: -1 }) result.albums = await dz.gw.get_user_albums(userID, { limit: -1 })
result.artists = await dz.gw.get_user_artists(userID, { limit: -1 }) result.artists = await dz.gw.get_user_artists(userID, { limit: -1 })
result.tracks = await dz.gw.get_user_tracks(userID, { limit: -1 }) result.tracks = await dz.gw.get_my_favorite_tracks({ limit: -1 })
result.lovedTracks = `https://deezer.com/playlist/${dz.current_user.loved_tracks}` result.lovedTracks = `https://deezer.com/playlist/${dz.current_user.loved_tracks}`
} else { } else {
result = { error: 'notLoggedIn' } result = { error: 'notLoggedIn' }

View File

@ -11,8 +11,7 @@ const handler: ApiHandler['handler'] = async (req, res) => {
let data let data
if (dz.logged_in) { if (dz.logged_in) {
const userID = dz.current_user.id data = await dz.gw.get_my_favorite_tracks({ limit: -1 })
data = await dz.gw.get_user_tracks(userID, { limit: -1 })
} else { } else {
data = { error: 'notLoggedIn' } data = { error: 'notLoggedIn' }
} }