modified code
This commit is contained in:
parent
c41302ccde
commit
f9c2338dd2
@ -71,13 +71,12 @@
|
||||
async list(){
|
||||
let data = await this.fetchData();
|
||||
this.state = {
|
||||
placeholder: "Rechercher dans les songs",
|
||||
items: data.results
|
||||
};
|
||||
this.update();
|
||||
},
|
||||
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();
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user