diff --git a/src/app/components/feed/postlist/postlist.component.ts b/src/app/components/feed/postlist/postlist.component.ts index 8209e8b..ec2e5f1 100644 --- a/src/app/components/feed/postlist/postlist.component.ts +++ b/src/app/components/feed/postlist/postlist.component.ts @@ -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; });