Reapply "Add missing admin action files and navigation links"
This reverts commit 4d515bc400.
This commit is contained in:
1 parent
96ed768f14
commit
5b4228261a
338 files changed
+28143
-5948
No files matched your search
@@ -48,9 +48,7 @@ function assignRarity(ownerCount: number): BadgeRarityKey {
|
||||
}
|
||||
|
||||
function rankEntries(entries: BadgeLeaderboardEntry[]): BadgeLeaderboardEntry[] {
|
||||
return entries
|
||||
.sort((a, b) => b.score - a.score)
|
||||
.map((e, i) => ({ ...e, rank: i + 1 }));
|
||||
return entries.sort((a, b) => b.score - a.score).map((e, i) => ({ ...e, rank: i + 1 }));
|
||||
}
|
||||
|
||||
async function loadTotalBadgesBoard(userId: number | null): Promise<BadgeLeaderboardBoard> {
|
||||
@@ -127,7 +125,9 @@ async function loadTotalBadgesBoard(userId: number | null): Promise<BadgeLeaderb
|
||||
}
|
||||
|
||||
async function loadAchievementBoard(userId: number | null): Promise<BadgeLeaderboardBoard> {
|
||||
const rows = await prisma.$queryRaw<Array<{ userId: bigint; username: string; look: string; score: number }>>(
|
||||
const rows = await prisma.$queryRaw<
|
||||
Array<{ userId: bigint; username: string; look: string; score: number }>
|
||||
>(
|
||||
Prisma.sql`
|
||||
SELECT us.user_id AS userId, u.username, u.look, us.achievement_score AS score
|
||||
FROM users_settings us
|
||||
|
||||
Reference in new issue
Block a user