fixed upvote bug

master
Max 5 years ago
parent c28959e01c
commit 506b33f5a8

@ -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;
});

Loading…
Cancel
Save