Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#00] rank type 고치기 #98

Merged
merged 2 commits into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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('point', '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)),
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

orm 에서 강제로 문자열로 변환해서 주는거는 처음 알았네요...


return result;
}

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