Front: Get Song History: Actually use API

This commit is contained in:
Arthur Jamet
2023-05-04 11:40:39 +01:00
parent 9dc2389c35
commit 5662082048
+3 -5
View File
@@ -331,11 +331,9 @@ export default class API {
* @param songId the id to find the song
*/
public static async getSongHistory(songId: number): Promise<SongHistory[]> {
return [67, 4578, 2, 9990].map((value) => ({
songId: songId,
userId: 1,
score: value,
}));
return API.fetch({
route: `/history`,
}).then((data: SongHistory[]) => data.filter((entry) => entry.songID == songId))
}
/**