refactor(1162): stream url change (#373)
parent
18749aad54
commit
f9e175039f
@ -1,26 +0,0 @@ |
|||||||
import isEmpty from 'lodash/isEmpty' |
|
||||||
|
|
||||||
import { API_ROOT, SportTypes } from 'config' |
|
||||||
import { callApi } from 'helpers' |
|
||||||
|
|
||||||
export type LiveVideos = Array<string> |
|
||||||
|
|
||||||
export const getLiveVideos = ( |
|
||||||
sportType: SportTypes, |
|
||||||
matchId: number, |
|
||||||
): Promise<LiveVideos> => { |
|
||||||
const config = { |
|
||||||
body: { |
|
||||||
match_id: matchId, |
|
||||||
sport_id: sportType, |
|
||||||
}, |
|
||||||
} |
|
||||||
|
|
||||||
return callApi({ |
|
||||||
config, |
|
||||||
url: `${API_ROOT}/video/stream`, |
|
||||||
}).then((videos: LiveVideos) => { |
|
||||||
if (isEmpty(videos)) return Promise.reject() |
|
||||||
return videos |
|
||||||
}) |
|
||||||
} |
|
||||||
Loading…
Reference in new issue