From 0e1c26404784c9bc4e81e87863736e46ecf506d6 Mon Sep 17 00:00:00 2001 From: Fauvet Matthis Date: Fri, 21 Jun 2024 01:44:45 +0200 Subject: [PATCH] modified code --- onzer.riot | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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(); }); }