fix(ranking): 명예의 전당 이전 기록을 프로필별로 분리
이전 서버 명예의 전당 조회를 요청 프로필의 archive로 제한한다. 클라이언트 profile 입력과 표시를 제거하고 API 및 Chromium 회귀 검증을 추가한다.
This commit is contained in:
@@ -285,7 +285,10 @@ export const findLegacyEmperor = async (db: LegacyArchiveDatabase, id: number):
|
||||
return rows[0] ?? null;
|
||||
};
|
||||
|
||||
export const findLegacyHallOptions = async (db: LegacyArchiveDatabase): Promise<LegacyHallOptionRow[]> =>
|
||||
export const findLegacyHallOptions = async (
|
||||
db: LegacyArchiveDatabase,
|
||||
sourceProfile: LegacyArchiveProfile
|
||||
): Promise<LegacyHallOptionRow[]> =>
|
||||
db.$queryRaw<LegacyHallOptionRow[]>(GamePrisma.sql`
|
||||
SELECT
|
||||
"source_profile" AS "sourceProfile",
|
||||
@@ -294,6 +297,7 @@ export const findLegacyHallOptions = async (db: LegacyArchiveDatabase): Promise<
|
||||
MAX("scenario_name") AS "scenarioName",
|
||||
COUNT(*)::bigint AS "count"
|
||||
FROM "legacy_archive"."game_history"
|
||||
WHERE "source_profile" = ${sourceProfile}
|
||||
GROUP BY "source_profile", "season", "scenario"
|
||||
ORDER BY "season" DESC, "source_profile", "scenario"
|
||||
`);
|
||||
|
||||
Reference in New Issue
Block a user