modified code
This commit is contained in:
parent
c41302ccde
commit
f9c2338dd2
@ -71,13 +71,12 @@
|
|||||||
async list(){
|
async list(){
|
||||||
let data = await this.fetchData();
|
let data = await this.fetchData();
|
||||||
this.state = {
|
this.state = {
|
||||||
placeholder: "Rechercher dans les songs",
|
|
||||||
items: data.results
|
items: data.results
|
||||||
};
|
};
|
||||||
this.update();
|
this.update();
|
||||||
},
|
},
|
||||||
fetchData(){
|
fetchData(){
|
||||||
return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/songs").then(response => {
|
return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/"+this.state.search).then(response => {
|
||||||
return response.json();
|
return response.json();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user