Front/use search api (#167)

This commit is contained in:
Arthur Jamet
2023-03-08 16:29:30 +00:00
committed by GitHub
parent f1a3f6e46a
commit 2bed2e1c64
3 changed files with 23 additions and 22 deletions
+3 -1
View File
@@ -300,7 +300,9 @@ export default class API {
* @param query the string used to find the songs
*/
public static async searchSongs(query: string): Promise<Song[]> {
return Promise.all([1, 5, 2].map(API.getSong));
return API.fetch({
route: `/search/guess/song/${query}`
});
}
/**