polymarket slug
This commit is contained in:
@@ -16,12 +16,16 @@ export async function GET() {
|
||||
try {
|
||||
const odds = await fetchOdds();
|
||||
matches = attachOdds(rawMatches, teams, odds);
|
||||
} catch {
|
||||
// still ohne Wahrscheinlichkeiten
|
||||
} catch (err) {
|
||||
console.error("[polymarket] fetchOdds fehlgeschlagen:", err);
|
||||
}
|
||||
|
||||
const groupTables = computeGroupTables(teams, matches);
|
||||
const groupTablesLive = computeGroupTables(teams, matches, true);
|
||||
|
||||
// prob-Feld normalisieren: immer null statt undefined, damit JSON konsistent ist
|
||||
const normalizedMatches = matches.map((m) => ({ ...m, prob: m.prob ?? null }));
|
||||
|
||||
const thirdTable = computeThirdPlaceTable(groupTablesLive);
|
||||
const qGroups = qualifiedThirdGroups(thirdTable);
|
||||
const annex = qGroups.length === 8 ? resolveAnnexC(qGroups) : null;
|
||||
@@ -29,7 +33,7 @@ export async function GET() {
|
||||
return NextResponse.json({
|
||||
updatedAt: new Date().toISOString(),
|
||||
teams,
|
||||
matches,
|
||||
matches: normalizedMatches,
|
||||
groupTables,
|
||||
groupTablesLive,
|
||||
thirdTable,
|
||||
|
||||
Reference in New Issue
Block a user