Skip to content

Commit

Permalink
Merge pull request #696 from bounswe/be-695/fix_typo
Browse files Browse the repository at this point in the history
be-695: Fix typo
  • Loading branch information
Alputer authored Dec 23, 2023
2 parents 771df7b + e5bbaa3 commit 428f21e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/backend/src/poll/poll.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ export class PollService {
...poll,
likeCount: poll.likes.length,
commentCount: poll.comments.length,
vote_count: await this.voteService.getVoteCount(poll.id),
voteCount: await this.voteService.getVoteCount(poll.id),
votedOption: null,
didLike: null,
vote_distribution: poll.is_settled === Settle.SETTLED ? await this.voteService.getVoteRate(poll.id) : null
voteDistribution: poll.is_settled === Settle.SETTLED ? await this.voteService.getVoteRate(poll.id) : null
};
})
);
Expand All @@ -286,8 +286,8 @@ export class PollService {
extendedPolls = await Promise.all(
extendedPolls.map(async (poll) => {
const votedOption = (await this.voteService.findOne(poll.id, userId))?.option ?? null;
if (!poll.vote_distribution && votedOption) {
poll.vote_distribution = await this.voteService.getVoteRate(poll.id);
if (!poll.voteDistribution && votedOption) {
poll.voteDistribution = await this.voteService.getVoteRate(poll.id);
}
return {
...poll,
Expand Down

0 comments on commit 428f21e

Please sign in to comment.