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.
42 lines
659 B
42 lines
659 B
import {
|
|
DATA_URL,
|
|
PROCEDURES,
|
|
} from 'config'
|
|
|
|
import { callApi } from 'helpers'
|
|
|
|
const proc = PROCEDURES.get_view_user_match
|
|
|
|
type ResponseType = {
|
|
duration?: number,
|
|
error?: string,
|
|
status: 1 | 2,
|
|
}
|
|
|
|
type ViewMatchDurationType = {
|
|
matchId: number,
|
|
sportType: number,
|
|
userId: number,
|
|
}
|
|
|
|
export const getViewMatchDuration = ({
|
|
matchId,
|
|
sportType,
|
|
userId,
|
|
}: ViewMatchDurationType): Promise<ResponseType> => {
|
|
const config = {
|
|
body: {
|
|
params: {
|
|
_p_match_id: matchId,
|
|
_p_sport_id: sportType,
|
|
_p_user_id: userId,
|
|
},
|
|
proc,
|
|
},
|
|
}
|
|
|
|
return callApi({
|
|
config,
|
|
url: DATA_URL,
|
|
})
|
|
}
|
|
|