mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-06-01 00:13:20 -05:00
* Initial * Faster user page * Remove redundant function * Favorite badge sorting * Upgrade deps * Simplify entry.server * Bun tests initial * Update package.json npm -> bun * Update README * Type safe translations again * Don't load streams info for finalized tournaments * Translations as an object * More unit test work * Convert match.server.test * test * test * test * test * test * test * test * test * test * test * test * test * test * test * test * test * test * Test & all done * Working cf * Bun GA try * No cache * spacing * spacing 2 * Add SQL logging * Remove NR * Hmm * Hmm 2 * Interesting * SKALOP_SYSTEM_MESSAGE_URL * . * . * ? * . * ? * Server.ts adjust * Downgrade Tldraw * E2E test fix * Fix lint
14 lines
413 B
TypeScript
14 lines
413 B
TypeScript
import { z } from "zod";
|
|
import { allSeasons } from "../mmr/season";
|
|
|
|
export const userParamsSchema = z.object({ identifier: z.string() });
|
|
|
|
export const seasonsSearchParamsSchema = z.object({
|
|
page: z.coerce.number().optional(),
|
|
info: z.enum(["weapons", "stages", "mates", "enemies"]).optional(),
|
|
season: z.coerce
|
|
.number()
|
|
.optional()
|
|
.refine((nth) => !nth || allSeasons(new Date()).includes(nth)),
|
|
});
|