fix(#2626): replace api route for get_matches

keep-around/c565ff1b550717786d8ee4b348e0fa82262be550
Andrei Dekterev 3 years ago
parent 613c224eca
commit c4f6ad9f1d
  1. 13
      src/requests/getMatches/getHomeMatches.tsx
  2. 4
      src/requests/getMatches/request.tsx

@ -23,14 +23,11 @@ export const getHomeMatches = async ({
}: Args): Promise<MatchesBySection> => {
const config = {
body: {
params: {
_p_date: date,
_p_gmt: timezoneOffset,
_p_limit: limit,
_p_offset: offset,
...client.requests?.[proc],
},
proc,
_p_date: `${date} 00:00:00`,
_p_gmt: timezoneOffset,
_p_limit: limit,
_p_offset: offset,
...client.requests?.[proc],
},
}

@ -1,4 +1,4 @@
import { DATA_URL } from 'config'
import { API_ROOT } from 'config'
import { callApi } from 'helpers'
import type { MatchesResponse, MatchesBySection } from './types'
@ -16,7 +16,7 @@ export const requestMatches = async (config: Config): Promise<MatchesBySection>
video_content: data,
}: MatchesResponse = await callApi({
config,
url: DATA_URL,
url: `${API_ROOT}/v1/data/get-matches/`,
})
return {

Loading…
Cancel
Save