modified code
This commit is contained in:
parent
bd8eb9681f
commit
04f906baef
@ -68,14 +68,14 @@
|
|||||||
},
|
},
|
||||||
async fetchData(){
|
async fetchData(){
|
||||||
let data = await this.execQuery();
|
let data = await this.execQuery();
|
||||||
|
console.log(this.state.search);
|
||||||
|
console.log(this.state.items);
|
||||||
this.state = {
|
this.state = {
|
||||||
items: data.results
|
items: data.results
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
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 => {
|
||||||
console.log(this.state.search);
|
|
||||||
console.log(response.json());
|
|
||||||
return response.json();
|
return response.json();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user