client/posts: add post featuring

This commit is contained in:
rr-
2016-08-02 10:37:56 +02:00
parent 3b800b9731
commit 179cf57cb9
5 changed files with 60 additions and 0 deletions

View File

@ -128,6 +128,15 @@ class Post extends events.EventTarget {
});
}
feature() {
return api.post('/featured-post', {id: this._id})
.then(response => {
return Promise.resolve();
}, response => {
return Promise.reject(response.description);
});
}
setScore(score) {
return api.put('/post/' + this._id + '/score', {score: score})
.then(response => {