Commit 71091bba authored by nanahira's avatar nanahira

tostring some votes

parent 1c949e19
Pipeline #2456 passed with stages
in 42 seconds
......@@ -963,7 +963,7 @@ export class AppService {
voteId: voteId.toString(),
optionId: optionId.toString(),
});
optionCountMap[optionId] = count;
optionCountMap[optionId] = count.toString(); // why to string?
}
private async fetchVoteInfo(
......@@ -986,8 +986,7 @@ export class AppService {
.where('vote_id = :voteId', { voteId: voteId.toString() })
.andWhere('option_id in (:...optionIdStrings)', { optionIdStrings })
.getRawOne();
const voteCount: number = parseInt(voteCountResult.voteCount);
voteCountMap[voteId] = voteCount;
voteCountMap[voteId] = voteCountResult.voteCount;
}
async getVotes(query: any) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment