From 877a38d744db4235876e1b48f49ab65b32515519 Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Fri, 1 May 2026 17:01:06 -0700 Subject: [PATCH] fix: rename variable to avoid shadowing expectedRounds function Variable 'expectedRounds' was shadowing the imported function of the same name, causing TypeScript build failure. --- src/app/api/tournaments/[id]/schedule/route.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/api/tournaments/[id]/schedule/route.ts b/src/app/api/tournaments/[id]/schedule/route.ts index b5599b1..e2bbc18 100644 --- a/src/app/api/tournaments/[id]/schedule/route.ts +++ b/src/app/api/tournaments/[id]/schedule/route.ts @@ -175,8 +175,8 @@ export async function POST(_request: Request, { params }: RouteParams) { } // Calculate expected rounds - const expectedRounds = expectedRounds(teamCount); - console.log(`[Schedule API] Expected rounds: ${expectedRounds}`); + const numRounds = expectedRounds(teamCount); + console.log(`[Schedule API] Expected rounds: ${numRounds}`); if (teamDurability === "permanent") { // ============================================ @@ -285,7 +285,7 @@ export async function POST(_request: Request, { params }: RouteParams) { const schedule = generateVariableRoundRobin( participants, teamCount, - expectedRounds, + numRounds, generateTeamWithRotation );