modified code
This commit is contained in:
parent
bd8eb9681f
commit
04f906baef
@ -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();
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user