modified code

This commit is contained in:
Matthis FAUVET 2024-06-21 18:09:53 +02:00
parent bd8eb9681f
commit 04f906baef

View File

@ -68,14 +68,14 @@
},
async fetchData(){
let data = await this.execQuery();
console.log(this.state.search);
console.log(this.state.items);
this.state = {
items: data.results
};
},
execQuery(){
return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/"+this.state.search).then(response => {
console.log(this.state.search);
console.log(response.json());
return response.json();
});
},