This commit is contained in:
yohlo
2025-08-28 18:09:09 -05:00
parent 8eea99b125
commit 381ddc8f34
17 changed files with 343 additions and 98 deletions

View File

@@ -3,6 +3,7 @@ import { createServerFn } from "@tanstack/react-start";
import { z } from "zod";
import { Logger } from "@/lib/logger";
import brackets from './utils';
import { BracketData } from "./types";
const logger = new Logger("Bracket Generation")
@@ -13,5 +14,5 @@ export const previewBracket = createServerFn()
logger.info('Generating bracket', teams);
if (!Object.keys(brackets).includes(teams.toString()))
throw Error("Bracket not available")
return brackets[teams];
return brackets[teams as keyof typeof brackets] as BracketData;
});