Use the new history api on the front
This commit is contained in:
+3
-3
@@ -331,10 +331,10 @@ export default class API {
|
||||
* Retrieve a song's play history
|
||||
* @param songId the id to find the song
|
||||
*/
|
||||
public static async getSongHistory(songId: number): Promise<SongHistory[]> {
|
||||
public static async getSongHistory(songId: number): Promise<{best: number, history: SongHistory[]}> {
|
||||
return API.fetch({
|
||||
route: `/history`,
|
||||
}).then((data: SongHistory[]) => data.filter((entry) => entry.songID == songId))
|
||||
route: `/song${songId}/history`,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user