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.
 
 
 
 
spa_instat_tv/src/requests/getSportList.tsx

27 lines
442 B

import {
DATA_URL,
PROCEDURES,
SportTypes,
} from 'config'
import { callApi, getResponseData } from 'helpers'
const proc = PROCEDURES.get_sport_list
export type SportList = Array<{
id: SportTypes,
lexic: number,
}>
export const getSportList = (): Promise<SportList> => {
const config = {
body: {
params: {},
proc,
},
}
return callApi({
config,
url: DATA_URL,
}).then(getResponseData(proc))
}