0
0
Fork 0

ミス廃: ランキングへの参加をオプトインに

This commit is contained in:
Ebise Lutica 2022-05-06 11:47:28 +09:00
parent 29a68897e1
commit aaf48cf329
8 changed files with 40 additions and 4 deletions

View file

@ -8,7 +8,9 @@ import { User } from '../models/entities/user';
*/
export const getRanking = async (limit?: number | null): Promise<User[]> => {
const query = Users.createQueryBuilder('user')
.where('"user"."bannedFromRanking" IS NOT TRUE')
.where('"user"."useRanking" IS TRUE')
.andWhere('"user"."bannedFromRanking" IS NOT TRUE')
.andWhere('"user"."rating" <> \'NaN\'')
.orderBy('"user".rating', 'DESC');
if (limit) {