From 1d8bf1ce868ed28f356f1ceda298acde13bfaa1c Mon Sep 17 00:00:00 2001 From: Nastya Date: Mon, 22 Jul 2024 22:32:01 +0300 Subject: [PATCH 1/3] customer v1.0.1 --- src/api/account.ts | 2 +- src/api/history/requests.ts | 2 +- src/api/quizStatistics/index.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/account.ts b/src/api/account.ts index c2bc0e7..45a7d58 100644 --- a/src/api/account.ts +++ b/src/api/account.ts @@ -30,7 +30,7 @@ export type Account = { wallet: Wallet; }; -const API_URL = `${process.env.REACT_APP_DOMAIN}/customer/v1.0.0`; +const API_URL = `${process.env.REACT_APP_DOMAIN}/customer/v1.0.1`; export const getAccountInfo = async (id: string): Promise<[Account | null, string?]> => { try { diff --git a/src/api/history/requests.ts b/src/api/history/requests.ts index 1e7765f..e5e59c1 100644 --- a/src/api/history/requests.ts +++ b/src/api/history/requests.ts @@ -23,7 +23,7 @@ type HistoryResponse = { totalPages: number; }; -const API_URL = `${process.env.REACT_APP_DOMAIN}/customer/v1.0.0`; +const API_URL = `${process.env.REACT_APP_DOMAIN}/customer/v1.0.1`; const getUserHistory = async (accountId: string, page: number): Promise<[HistoryResponse | null, string?]> => { try { diff --git a/src/api/quizStatistics/index.ts b/src/api/quizStatistics/index.ts index 07d3001..eb878be 100644 --- a/src/api/quizStatistics/index.ts +++ b/src/api/quizStatistics/index.ts @@ -40,7 +40,7 @@ export const getStatisticSchild = async (from: number, to: number): Promise<[Qui try { const statisticResponse = await makeRequest({ method: "POST", - url: `${API_URL}/customer/v1.0.0/quizlogo/stat`, + url: `${API_URL}/customer/v1.0.1/quizlogo/stat`, body: { to, from, page: 0, limit: 100 }, useToken: true, }); @@ -74,7 +74,7 @@ export const getStatisticsPromocode = async ( try { const statisticsPromocode = await makeRequest>({ method: "POST", - url: `${API_URL}/customer/v1.0.0/promocode/ltv`, + url: `${API_URL}/customer/v1.0.1/promocode/ltv`, body: { to, from }, useToken: true, }); From c06521623014070af97ec90e1236be55e27b4287 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Tue, 23 Jul 2024 11:46:53 +0000 Subject: [PATCH 2/3] Update admin.conf --- admin.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin.conf b/admin.conf index 04ae212..af6ccea 100644 --- a/admin.conf +++ b/admin.conf @@ -108,7 +108,7 @@ server { proxy_pass http://10.8.0.6:59303/; } - location /customer/ { + location /customer/v1.0.1/ { if ($request_method = OPTIONS) { add_header Access-Control-Allow-Origin $http_origin always; add_header Access-Control-Allow-Credentials true always; @@ -120,7 +120,7 @@ server { add_header Access-Control-Allow-Credentials true always; add_header Access-Control-Allow-Headers content-type,authorization always; add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE; - proxy_pass http://10.8.0.6:8065/; + proxy_pass http://10.8.0.6:8070/; } location /codeword/ { From eb495f50fd6c725f18b2561df0895e8ec2c4ee94 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Sat, 27 Jul 2024 17:35:29 +0000 Subject: [PATCH 3/3] Update admin.conf --- admin.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/admin.conf b/admin.conf index af6ccea..677b3bc 100644 --- a/admin.conf +++ b/admin.conf @@ -138,6 +138,21 @@ server { proxy_pass http://10.8.0.6:59664/; } + location /codeword/v1.0.0 { + if ($request_method = OPTIONS) { + add_header Access-Control-Allow-Origin $http_origin always; + add_header Access-Control-Allow-Credentials true always; + add_header Access-Control-Allow-Headers content-type,authorization always; + add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE; + return 200; + } + add_header Access-Control-Allow-Origin $http_origin always; + add_header Access-Control-Allow-Credentials true always; + add_header Access-Control-Allow-Headers content-type,authorization always; + add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE; + proxy_pass http://10.8.0.6:29100/; + } + location /answer/ { if ($request_method = OPTIONS) { add_header Access-Control-Allow-Origin $http_origin always;