Skip to content

Commit

Permalink
Merge pull request #98 from Boost-Coder/feature/fixRankType-#00
Browse files Browse the repository at this point in the history
[#00] rank type 고치기
  • Loading branch information
koomin1227 authored May 28, 2024
2 parents bcf5324 + dcb6da9 commit 068353c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/utils/stat.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ export class StatRepository extends Repository<any> {
.orderBy('score', 'DESC')
.addOrderBy('userId')
.limit(3);
return await (<Promise<[RankListDto]>>queryBuilder.getRawMany());
const result = await (<Promise<[RankListDto]>>(
queryBuilder.getRawMany()
));
result.forEach(
(result) => (result.rank = parseInt(String(result.rank), 10)),
);

return result;
}

public async findIndividualRank(userId: string, options: PointFindDto) {
Expand Down

0 comments on commit 068353c

Please sign in to comment.