|
|
|
@ -22,7 +22,7 @@ export class PostlistComponent implements OnInit {
|
|
|
|
|
voteUp(pPost: Post) {
|
|
|
|
|
this.feedService.upvote(pPost.id).subscribe(response => {
|
|
|
|
|
// this.voteEvent.emit(true);
|
|
|
|
|
pPost.userVote = response.json().data.vote;
|
|
|
|
|
pPost.userVote = response.json().data.vote.post.userVote;
|
|
|
|
|
pPost.upvotes = response.json().data.vote.post.upvotes;
|
|
|
|
|
pPost.downvotes = response.json().data.vote.post.downvotes;
|
|
|
|
|
});
|
|
|
|
|