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.
34 lines
528 B
34 lines
528 B
import {
|
|
DATA_URL,
|
|
PROCEDURES,
|
|
} from 'config'
|
|
import { callApi } from 'helpers'
|
|
|
|
const proc = PROCEDURES.get_subscriptions
|
|
|
|
type Tournament = {
|
|
id: number,
|
|
name_eng: string,
|
|
name_rus: string,
|
|
sport: number,
|
|
}
|
|
|
|
export type SubscriptionType = {
|
|
id: number,
|
|
lexic: number,
|
|
tournaments: Array<Tournament>,
|
|
}
|
|
|
|
export const getSubscriptions = (): Promise<Array<SubscriptionType>> => {
|
|
const config = {
|
|
body: {
|
|
params: {},
|
|
proc,
|
|
},
|
|
}
|
|
|
|
return callApi({
|
|
config,
|
|
url: DATA_URL,
|
|
})
|
|
}
|
|
|