modified code

This commit is contained in:
Matthis FAUVET 2024-06-21 16:34:35 +02:00
parent 9699005e9e
commit b13e46ca00

View File

@ -69,11 +69,13 @@
this.update(); this.update();
}, },
async list(){ async list(){
this.state = { let data = await this.fetchData();
console.log(data);
/*this.state = {
placeholder: "Rechercher dans les songs", placeholder: "Rechercher dans les songs",
items: await this.fetchData() items: await this.fetchData()
}; };
this.update(); this.update();*/
}, },
fetchData(){ fetchData(){
return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/"+this.state.search+"").then(response => { return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/"+this.state.search+"").then(response => {