flags
This commit is contained in:
13
lib/feeds.ts
13
lib/feeds.ts
@@ -59,8 +59,10 @@ interface FdMatchesResponse {
|
||||
matchday?: number | null;
|
||||
stage: string;
|
||||
group?: string | null;
|
||||
homeTeam: { id: number | null; name: string | null; tla?: string | null };
|
||||
awayTeam: { id: number | null; name: string | null; tla?: string | null };
|
||||
venue?: string | null;
|
||||
attendance?: number | null;
|
||||
homeTeam: { id: number | null; name: string | null; tla?: string | null; crest?: string | null };
|
||||
awayTeam: { id: number | null; name: string | null; tla?: string | null; crest?: string | null };
|
||||
score: { fullTime: { home: number | null; away: number | null } };
|
||||
}>;
|
||||
}
|
||||
@@ -97,7 +99,10 @@ export async function fetchMatchesAndTeams(): Promise<{ matches: Match[]; teams:
|
||||
if (side.id != null && side.name && group) {
|
||||
const id = String(side.id);
|
||||
if (!teamMap.has(id)) {
|
||||
teamMap.set(id, { id, name: side.name, code: side.tla ?? "", group });
|
||||
teamMap.set(id, {
|
||||
id, name: side.name, code: side.tla ?? "", group,
|
||||
crest: side.crest ?? null,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,6 +118,8 @@ export async function fetchMatchesAndTeams(): Promise<{ matches: Match[]; teams:
|
||||
awayTeamId: m.awayTeam.id != null ? String(m.awayTeam.id) : null,
|
||||
homeScore: m.score.fullTime.home,
|
||||
awayScore: m.score.fullTime.away,
|
||||
venue: m.venue ?? null,
|
||||
attendance: m.attendance ?? null,
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user