diff --git a/onzer.riot b/onzer.riot index c85bc6e..dce791f 100644 --- a/onzer.riot +++ b/onzer.riot @@ -18,7 +18,8 @@ export default { async onBeforeMount(props){ this.state.placeholder = 'Rechercher dans les albums'; - this.fetchSong(); + this.state.items = await this.fetchSong(); + console.log(this.state.items); }, edit(e) { @@ -54,7 +55,7 @@ }, async fetchSong(){ return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/songs").then(response => { - return response; + return response.json(); }); }