|
|
|
|
@ -91,18 +91,31 @@ export const getMatchPlaylists = async ({ |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const playlist: Response = await callApi({ |
|
|
|
|
config, |
|
|
|
|
url: `${DATA_URL}/${getSportLexic(sportType)}`, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const full_game: PlaylistWithDuration = { |
|
|
|
|
data: [], |
|
|
|
|
dur: fullMatchDuration, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (playlist.data) { |
|
|
|
|
return { ...playlist.data, full_game } |
|
|
|
|
try { |
|
|
|
|
const playlist: Response = await callApi({ |
|
|
|
|
config, |
|
|
|
|
url: `${DATA_URL}/${getSportLexic(sportType)}`, |
|
|
|
|
}) |
|
|
|
|
if (playlist.data) { |
|
|
|
|
return { ...playlist.data, full_game } |
|
|
|
|
} |
|
|
|
|
} catch { |
|
|
|
|
return { |
|
|
|
|
ball_in_play: {}, |
|
|
|
|
full_game, |
|
|
|
|
goals: {}, |
|
|
|
|
highlights: {}, |
|
|
|
|
lexics: {}, |
|
|
|
|
players1: [], |
|
|
|
|
players2: [], |
|
|
|
|
score1: 0, |
|
|
|
|
score2: 0, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
|