modified code

This commit is contained in:
Matthis FAUVET 2024-06-21 01:44:45 +02:00
parent 30c8522de9
commit 0e1c264047

View File

@ -18,7 +18,8 @@
export default {
async onBeforeMount(props){
this.state.placeholder = 'Rechercher dans les albums';
this.fetchSong();
this.state.items = await this.fetchSong();
console.log(this.state.items);
},
edit(e) {
@ -54,7 +55,7 @@
},
async fetchSong(){
return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/songs").then(response => {
return response;
return response.json();
});
}