From 79d602a490c6e6ef72ec5bb583d198fcd7552cfb Mon Sep 17 00:00:00 2001 From: RemixDev Date: Wed, 9 Mar 2022 11:22:14 +0100 Subject: [PATCH] Fixed get favorite tracks --- server/src/routes/api/get/getUserFavorites.ts | 2 +- server/src/routes/api/get/getUserTracks.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/src/routes/api/get/getUserFavorites.ts b/server/src/routes/api/get/getUserFavorites.ts index 12807b0..5336a08 100644 --- a/server/src/routes/api/get/getUserFavorites.ts +++ b/server/src/routes/api/get/getUserFavorites.ts @@ -17,7 +17,7 @@ const handler: ApiHandler['handler'] = async (req, res) => { result.playlists = await dz.gw.get_user_playlists(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.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}` } else { result = { error: 'notLoggedIn' } diff --git a/server/src/routes/api/get/getUserTracks.ts b/server/src/routes/api/get/getUserTracks.ts index b6fe792..fd927a4 100644 --- a/server/src/routes/api/get/getUserTracks.ts +++ b/server/src/routes/api/get/getUserTracks.ts @@ -11,8 +11,7 @@ const handler: ApiHandler['handler'] = async (req, res) => { let data if (dz.logged_in) { - const userID = dz.current_user.id - data = await dz.gw.get_user_tracks(userID, { limit: -1 }) + data = await dz.gw.get_my_favorite_tracks({ limit: -1 }) } else { data = { error: 'notLoggedIn' } }