Update matches.service.ts
Deploy Iddaai Backend / build-and-deploy (push) Successful in 30s

This commit is contained in:
2026-05-05 01:04:56 +03:00
parent 27e96da31d
commit 34cc4a6cbb
+12 -3
View File
@@ -761,10 +761,19 @@ export class MatchesService {
teamStats: normalizedTeamStats, teamStats: normalizedTeamStats,
mstUtc: Number(match.mstUtc), mstUtc: Number(match.mstUtc),
date: match.date || new Date(Number(match.mstUtc)), date: match.date || new Date(Number(match.mstUtc)),
// Ensure score is in expected format (nested object for frontend if needed, but frontend seems to use match.score.home in some places and match.scoreHome in others.
// The match-detail-content uses match.score.home. Match entity has scoreHome/scoreAway fields.
// Let's ensure compatibility.
score: match.score || { home: match.scoreHome, away: match.scoreAway }, score: match.score || { home: match.scoreHome, away: match.scoreAway },
homeTeam: {
...match.homeTeam,
logo: match.homeTeamId
? `https://file.mackolikfeeds.com/teams/${match.homeTeamId}`
: match.homeTeam?.logoUrl || null,
},
awayTeam: {
...match.awayTeam,
logo: match.awayTeamId
? `https://file.mackolikfeeds.com/teams/${match.awayTeamId}`
: match.awayTeam?.logoUrl || null,
},
stats: { stats: {
home: this.normalizeTeamStat(homeStat, match.sport), home: this.normalizeTeamStat(homeStat, match.sport),
away: this.normalizeTeamStat(awayStat, match.sport), away: this.normalizeTeamStat(awayStat, match.sport),