This commit is contained in:
2026-06-26 18:34:58 -05:00
parent 6f0acaad4c
commit 6bb6f9be7a
3 changed files with 89 additions and 39 deletions

View File

@@ -1,5 +1,5 @@
import { NextResponse } from "next/server";
import { fetchMatchesAndTeams, fetchOdds, attachOdds, fetchLiveScores, applyLiveScores } from "@/lib/feeds";
import { fetchMatchesAndTeams, fetchOdds, attachOdds, fetchLiveScores, applyLiveScores, assignKONumbersBySlots } from "@/lib/feeds";
import { computeGroupTables, computeThirdPlaceTable } from "@/lib/standings";
import { qualifiedThirdGroups, resolveAnnexC } from "@/lib/bracket";
@@ -31,6 +31,9 @@ export async function GET() {
const groupTables = computeGroupTables(teams, matches);
const groupTablesLive = computeGroupTables(teams, matches, true);
// K.o.-Match-Nummern per Slot-Auflösung vergeben (FIFA-Topologie)
assignKONumbersBySlots(matches, teams);
// prob-Feld normalisieren: immer null statt undefined, damit JSON konsistent ist
const normalizedMatches = matches.map((m) => ({ ...m, prob: m.prob ?? null }));