Merge branch 'staging'

This commit is contained in:
Nastya 2024-08-30 16:01:25 +03:00
commit d37c8153ac
4 changed files with 38 additions and 7 deletions

@ -115,7 +115,7 @@ server {
proxy_pass http://10.8.0.8: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;
@ -127,9 +127,40 @@ 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.8:8065/;
proxy_pass http://10.8.0.6:8070/;
}
location /customer/v1.0.0/ {
location /codeword/ {
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: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;
add_header Access-Control-Allow-Credentials true always;

@ -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 {

@ -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 {

@ -40,7 +40,7 @@ export const getStatisticSchild = async (from: number, to: number): Promise<[Qui
try {
const statisticResponse = await makeRequest<GetStatisticSchildBody, QuizStatisticsItem[]>({
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<GetPromocodeStatisticsBody, Record<string, AllPromocodeStatistics>>({
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,
});