Finish version

This commit is contained in:
Andros Fenollosa
2021-06-25 14:25:14 +02:00
parent 9f6fcf447d
commit 4d6f73ac63
7 changed files with 59 additions and 17 deletions

View File

@ -16,6 +16,18 @@ new Vue({
.then((json) => {
this.news = json;
});
}
},
votar: function (id) {
fetch('/api/v1/news/', {
headers: {
'Content-type': 'application/json'
},
method: 'PUT',
body: JSON.stringify({ id: id })
})
.then((json) => {
this.getNews();
});
}
}
})