From c4f6ad9f1d2e625c0504957853f54455de17d2e6 Mon Sep 17 00:00:00 2001 From: Andrei Dekterev Date: Mon, 1 Aug 2022 16:00:56 +0400 Subject: [PATCH] fix(#2626): replace api route for get_matches --- src/requests/getMatches/getHomeMatches.tsx | 13 +++++-------- src/requests/getMatches/request.tsx | 4 ++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/requests/getMatches/getHomeMatches.tsx b/src/requests/getMatches/getHomeMatches.tsx index e7d91870..7dcc530d 100644 --- a/src/requests/getMatches/getHomeMatches.tsx +++ b/src/requests/getMatches/getHomeMatches.tsx @@ -23,14 +23,11 @@ export const getHomeMatches = async ({ }: Args): Promise => { 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], }, } diff --git a/src/requests/getMatches/request.tsx b/src/requests/getMatches/request.tsx index cdfeeb41..308f1b01 100644 --- a/src/requests/getMatches/request.tsx +++ b/src/requests/getMatches/request.tsx @@ -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 video_content: data, }: MatchesResponse = await callApi({ config, - url: DATA_URL, + url: `${API_ROOT}/v1/data/get-matches/`, }) return {