From c4f6ad9f1d2e625c0504957853f54455de17d2e6 Mon Sep 17 00:00:00 2001 From: Andrei Dekterev Date: Mon, 1 Aug 2022 16:00:56 +0400 Subject: [PATCH 1/2] 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 { From 30a53f48f52794dbe89a537653c564a5b8c1a3aa Mon Sep 17 00:00:00 2001 From: Andrei Dekterev Date: Mon, 8 Aug 2022 14:02:21 +0400 Subject: [PATCH 2/2] fix(#2628): change route get matches --- package-lock.json | 10 +++++++++- src/requests/getMatches/request.tsx | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0e7b65c8..edade4f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10866,6 +10866,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "devOptional": true, "engines": { "node": ">=8" } @@ -11765,6 +11766,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "devOptional": true, "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -18750,6 +18752,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "devOptional": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -27128,6 +27131,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "devOptional": true, "dependencies": { "picomatch": "^2.2.1" }, @@ -41695,7 +41699,8 @@ "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "devOptional": true }, "bindings": { "version": "1.5.0", @@ -42409,6 +42414,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "devOptional": true, "requires": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -47861,6 +47867,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "devOptional": true, "requires": { "binary-extensions": "^2.0.0" } @@ -54355,6 +54362,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "devOptional": true, "requires": { "picomatch": "^2.2.1" } diff --git a/src/requests/getMatches/request.tsx b/src/requests/getMatches/request.tsx index 308f1b01..0a953fde 100644 --- a/src/requests/getMatches/request.tsx +++ b/src/requests/getMatches/request.tsx @@ -16,7 +16,7 @@ export const requestMatches = async (config: Config): Promise video_content: data, }: MatchesResponse = await callApi({ config, - url: `${API_ROOT}/v1/data/get-matches/`, + url: `${API_ROOT}/v1/data/get-matches`, }) return {