added logs

This commit is contained in:
Matthis FAUVET 2024-06-21 18:11:49 +02:00
parent 04f906baef
commit 1f8928143b

View File

@ -69,10 +69,11 @@
async fetchData(){ async fetchData(){
let data = await this.execQuery(); let data = await this.execQuery();
console.log(this.state.search); console.log(this.state.search);
console.log(this.state.items); console.log(data.results);
this.state = { this.state = {
items: data.results items: data.results
}; };
console.log(this.state.items);
}, },
execQuery(){ execQuery(){
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 => {