Finish version
This commit is contained in:
@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user