fix(boxing): fix getmatchplaylists for boxing

keep-around/2fd168b18eeebc91eac94ae86d817c12edfe1576
Andrei Dekterev 3 years ago
parent 551ef29319
commit 555a194b6b
  1. 27
      src/requests/getMatchPlaylists.tsx

@ -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 {

Loading…
Cancel
Save