attempted upgrade

This commit is contained in:
yohlo
2025-09-24 00:13:41 -05:00
parent 94ea44c66e
commit e4164cbc71
26 changed files with 1390 additions and 1273 deletions

View File

@@ -16,7 +16,7 @@ const orderedTeamsSchema = z.object({
});
export const generateTournamentBracket = createServerFn()
.validator(orderedTeamsSchema)
.inputValidator(orderedTeamsSchema)
.middleware([superTokensAdminFunctionMiddleware])
.handler(async ({ data: { tournamentId, orderedTeamIds } }) =>
toServerResult(async () => {
@@ -137,7 +137,7 @@ export const generateTournamentBracket = createServerFn()
);
export const startMatch = createServerFn()
.validator(z.string())
.inputValidator(z.string())
.middleware([superTokensAdminFunctionMiddleware])
.handler(async ({ data }) =>
toServerResult(async () => {
@@ -170,7 +170,7 @@ const endMatchSchema = z.object({
ot_count: z.number(),
});
export const endMatch = createServerFn()
.validator(endMatchSchema)
.inputValidator(endMatchSchema)
.middleware([superTokensAdminFunctionMiddleware])
.handler(async ({ data: { matchId, home_cups, away_cups, ot_count } }) =>
toServerResult(async () => {
@@ -252,7 +252,7 @@ const toggleReactionSchema = z.object({
});
export const toggleMatchReaction = createServerFn()
.validator(toggleReactionSchema)
.inputValidator(toggleReactionSchema)
.middleware([superTokensFunctionMiddleware])
.handler(async ({ data: { matchId, emoji }, context }) =>
toServerResult(async () => {
@@ -312,7 +312,7 @@ export interface Reaction {
players: PlayerInfo[];
}
export const getMatchReactions = createServerFn()
.validator(z.string())
.inputValidator(z.string())
.middleware([superTokensFunctionMiddleware])
.handler(async ({ data: matchId, context }) =>
toServerResult(async () => {