You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
568 B
35 lines
568 B
import {
|
|
DATA_URL,
|
|
PROCEDURES,
|
|
SportTypes,
|
|
} from 'config'
|
|
import { callApi, getSportLexic } from 'helpers'
|
|
|
|
const proc = PROCEDURES.ott_match_popup_actions
|
|
|
|
type Action = {
|
|
id: number,
|
|
lexic: number,
|
|
}
|
|
|
|
export type Actions = Array<Action>
|
|
|
|
type Response = {
|
|
data: Actions,
|
|
}
|
|
|
|
export const getSportActions = async (sportType: SportTypes) => {
|
|
const config = {
|
|
body: {
|
|
params: {},
|
|
proc,
|
|
},
|
|
}
|
|
|
|
const response: Response = await callApi({
|
|
config,
|
|
url: `${DATA_URL}/${getSportLexic(sportType)}`,
|
|
})
|
|
|
|
return response.data
|
|
}
|
|
|