mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-11 20:10:59 -05:00
Exported images w/ SQ season summary downloadable (#3272)
This commit is contained in:
@@ -369,6 +369,9 @@ export function buildCases(fx: Fixtures): {
|
||||
add("SkillRepository.findSeasonProgressionByUserId", fx.sq, (sq) =>
|
||||
SkillRepository.findSeasonProgressionByUserId(sq),
|
||||
);
|
||||
add("SkillRepository.findSeasonActiveDaysByUserId", fx.sq, (sq) =>
|
||||
SkillRepository.findSeasonActiveDaysByUserId(sq),
|
||||
);
|
||||
|
||||
// NotificationRepository
|
||||
add("NotificationRepository.findByUserId", fx.notification, (notification) =>
|
||||
@@ -480,6 +483,15 @@ export function buildCases(fx: Fixtures): {
|
||||
type: "MATE",
|
||||
}),
|
||||
);
|
||||
add("PlayerStatRepository.findSeasonSetScoresByUserId", fx.sq, (sq) =>
|
||||
PlayerStatRepository.findSeasonSetScoresByUserId(sq),
|
||||
);
|
||||
add("PlayerStatRepository.findSeasonBestSetsByUserId", fx.sq, (sq) =>
|
||||
PlayerStatRepository.findSeasonBestSetsByUserId({ ...sq, limit: 3 }),
|
||||
);
|
||||
add("PlayerStatRepository.findSeasonTournamentRunsByUserId", fx.sq, (sq) =>
|
||||
PlayerStatRepository.findSeasonTournamentRunsByUserId(sq),
|
||||
);
|
||||
|
||||
// ReportedWeaponRepository
|
||||
add(
|
||||
@@ -979,6 +991,9 @@ export function buildCases(fx: Fixtures): {
|
||||
add("UserRepository.findIdByIdentifier", fx.heavyUser, (user) =>
|
||||
UserRepository.findIdByIdentifier(user.identifier),
|
||||
);
|
||||
add("UserRepository.findCountriesByUserIds", fx.skillBatch, (skillBatch) =>
|
||||
UserRepository.findCountriesByUserIds(skillBatch.userIds),
|
||||
);
|
||||
add("UserRepository.findBuildFieldsByIdentifier", fx.heavyUser, (user) =>
|
||||
UserRepository.findBuildFieldsByIdentifier(user.identifier),
|
||||
);
|
||||
|
||||
@@ -557,7 +557,7 @@ async function resolveCalendarAuthorId() {
|
||||
async function resolveCalendarWindow() {
|
||||
const row = await db
|
||||
.selectFrom("CalendarEventDate")
|
||||
.select(({ fn }) => fn.max("startTime").as("maxStartTime"))
|
||||
.select(({ fn }) => fn.max("startsAt").as("maxStartTime"))
|
||||
.executeTakeFirst();
|
||||
if (typeof row?.maxStartTime !== "number") return null;
|
||||
|
||||
@@ -569,7 +569,7 @@ async function resolveCalendarWindow() {
|
||||
async function resolveScrimWindow() {
|
||||
const row = await db
|
||||
.selectFrom("ScrimPost")
|
||||
.select(({ fn }) => fn.max("at").as("maxAt"))
|
||||
.select(({ fn }) => fn.max("startsAt").as("maxAt"))
|
||||
.executeTakeFirst();
|
||||
if (typeof row?.maxAt !== "number") return null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user