ランキング10位以上が表示されない不具合を修正
This commit is contained in:
parent
fbcdf9bf5f
commit
c717a42bb6
@ -6,12 +6,12 @@ import { User } from '../models/entities/user';
|
||||
* @param limit 取得する件数
|
||||
* @returns ミス廃ランキング
|
||||
*/
|
||||
export const getRanking = async (limit: number | null = 10): Promise<User[]> => {
|
||||
export const getRanking = async (limit?: number | null): Promise<User[]> => {
|
||||
const query = Users.createQueryBuilder('user')
|
||||
.where('"user"."bannedFromRanking" IS NOT TRUE')
|
||||
.orderBy('"user".rating', 'DESC');
|
||||
|
||||
if (limit !== null) {
|
||||
if (limit) {
|
||||
query.limit(limit);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user