help me with configs
This commit is contained in:
parent
3bbc644dcb
commit
be35d127bc
BIN
hosta-admin-prod-1054.zip
Normal file
BIN
hosta-admin-prod-1054.zip
Normal file
Binary file not shown.
@ -22,7 +22,7 @@ function defaultDataResponseProcessor(data) {
|
|||||||
export const API_PATH_MAIN = "https://hostapay.trade/api/v1/";
|
export const API_PATH_MAIN = "https://hostapay.trade/api/v1/";
|
||||||
export const API_PATH_TEST = "https://test.0x000f.ru/api/v1/";
|
export const API_PATH_TEST = "https://test.0x000f.ru/api/v1/";
|
||||||
|
|
||||||
let BasicURLValue = API_PATH_MAIN;
|
export const API_PATH_VALUE = API_PATH_MAIN;
|
||||||
|
|
||||||
async function makePost(
|
async function makePost(
|
||||||
url,
|
url,
|
||||||
@ -33,7 +33,7 @@ async function makePost(
|
|||||||
errorProcessor = defaultErrorProcessor
|
errorProcessor = defaultErrorProcessor
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const res = await axios.post(BasicURLValue + url, data, options);
|
const res = await axios.post(API_PATH_VALUE + url, data, options);
|
||||||
return responseProcessor(res, dataResponseProcessor);
|
return responseProcessor(res, dataResponseProcessor);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return errorProcessor(error);
|
return errorProcessor(error);
|
||||||
@ -48,7 +48,7 @@ async function makeGet(
|
|||||||
errorProcessor = defaultErrorProcessor
|
errorProcessor = defaultErrorProcessor
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const res = await axios.get(BasicURLValue + url, options);
|
const res = await axios.get(API_PATH_VALUE + url, options);
|
||||||
return responseProcessor(res, dataResponseProcessor);
|
return responseProcessor(res, dataResponseProcessor);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return errorProcessor(error);
|
return errorProcessor(error);
|
||||||
@ -56,7 +56,6 @@ async function makeGet(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
BasicURLValue,
|
|
||||||
makePost,
|
makePost,
|
||||||
makeGet,
|
makeGet,
|
||||||
defaultResponseProcessor,
|
defaultResponseProcessor,
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
import {
|
import {
|
||||||
API_PATH_TEST,
|
API_PATH_TEST,
|
||||||
API_PATH_MAIN,
|
API_PATH_MAIN,
|
||||||
|
API_PATH_VALUE,
|
||||||
makePost,
|
makePost,
|
||||||
} from "$lib/tools/requests/requests";
|
} from "$lib/tools/requests/requests";
|
||||||
import { sayError, sayInfo } from "$lib/tools/toaster/Toaster";
|
import { sayError, sayInfo } from "$lib/tools/toaster/Toaster";
|
||||||
@ -164,7 +165,7 @@
|
|||||||
showLoadingReceiptShowing = true;
|
showLoadingReceiptShowing = true;
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(
|
const response = await axios.get(
|
||||||
API_PATH_MAIN + "loadFile?dispute=" + selectedDispute["order_id"],
|
API_PATH_VALUE + "loadFile?dispute=" + selectedDispute["order_id"],
|
||||||
// "17731",
|
// "17731",
|
||||||
{
|
{
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
@ -286,8 +287,12 @@
|
|||||||
<div
|
<div
|
||||||
class="fixed inset-0 flex justify-center items-center md:p-32 p-8 pt-[68px] bg-black bg-opacity-50"
|
class="fixed inset-0 flex justify-center items-center md:p-32 p-8 pt-[68px] bg-black bg-opacity-50"
|
||||||
>
|
>
|
||||||
<div class="flex flex-col w-full max-w-[600px] max-h-[80%] overflow-auto p-4 rounded-box bg-base-300">
|
<div
|
||||||
<p class="self-center opacity-60 text-center ">ID: {selectedDispute["order_id"]}</p>
|
class="flex flex-col w-full max-w-[600px] max-h-[80%] overflow-auto p-4 rounded-box bg-base-300"
|
||||||
|
>
|
||||||
|
<p class="self-center opacity-60 text-center">
|
||||||
|
ID: {selectedDispute["order_id"]}
|
||||||
|
</p>
|
||||||
<p
|
<p
|
||||||
class={"self-center text-3xl text-center " +
|
class={"self-center text-3xl text-center " +
|
||||||
disputesStatusMapColors[selectedDispute["order_status"]]}
|
disputesStatusMapColors[selectedDispute["order_status"]]}
|
||||||
@ -341,7 +346,7 @@
|
|||||||
on:click={() => {
|
on:click={() => {
|
||||||
axios
|
axios
|
||||||
.get(
|
.get(
|
||||||
API_PATH_MAIN +
|
API_PATH_VALUE +
|
||||||
"loadFile?dispute=" +
|
"loadFile?dispute=" +
|
||||||
selectedDispute["order_id"],
|
selectedDispute["order_id"],
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
API_PATH_TEST,
|
API_PATH_TEST,
|
||||||
API_PATH_MAIN,
|
API_PATH_MAIN,
|
||||||
makePost,
|
makePost,
|
||||||
|
API_PATH_VALUE,
|
||||||
} from "$lib/tools/requests/requests";
|
} from "$lib/tools/requests/requests";
|
||||||
import { sayError, sayInfo } from "$lib/tools/toaster/Toaster";
|
import { sayError, sayInfo } from "$lib/tools/toaster/Toaster";
|
||||||
import Pagination from "$lib/ui-components/pagination.svelte";
|
import Pagination from "$lib/ui-components/pagination.svelte";
|
||||||
@ -689,7 +690,7 @@
|
|||||||
on:click={() => {
|
on:click={() => {
|
||||||
axios
|
axios
|
||||||
.get(
|
.get(
|
||||||
API_PATH_MAIN +
|
API_PATH_VALUE +
|
||||||
"admin/loadFile?payout=" +
|
"admin/loadFile?payout=" +
|
||||||
selectedPayout["uuid"],
|
selectedPayout["uuid"],
|
||||||
{
|
{
|
||||||
|
@ -20,10 +20,19 @@
|
|||||||
userData.balance,
|
userData.balance,
|
||||||
value_role,
|
value_role,
|
||||||
userData.bid,
|
userData.bid,
|
||||||
userData.payout_bid
|
userData.payout_bid,
|
||||||
|
userData.deposit_address
|
||||||
);
|
);
|
||||||
|
|
||||||
function checkFields(name, surname, balance, role, bid, payout_bid) {
|
function checkFields(
|
||||||
|
name,
|
||||||
|
surname,
|
||||||
|
balance,
|
||||||
|
role,
|
||||||
|
bid,
|
||||||
|
payout_bid,
|
||||||
|
deposit_address
|
||||||
|
) {
|
||||||
// balance = Number(balance);
|
// balance = Number(balance);
|
||||||
// bid = Number(balance);
|
// bid = Number(balance);
|
||||||
console.log(name, surname, balance, role, bid, payout_bid);
|
console.log(name, surname, balance, role, bid, payout_bid);
|
||||||
@ -52,6 +61,10 @@
|
|||||||
canChangeUser = false;
|
canChangeUser = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (deposit_address.length < 28) {
|
||||||
|
canChangeUser = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
canChangeUser = true;
|
canChangeUser = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,6 +83,7 @@
|
|||||||
role: value_role,
|
role: value_role,
|
||||||
bid: userData.bid.toString(),
|
bid: userData.bid.toString(),
|
||||||
payout_bid: userData.payout_bid.toString(),
|
payout_bid: userData.payout_bid.toString(),
|
||||||
|
deposit_address: userData.deposit_address,
|
||||||
},
|
},
|
||||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
||||||
);
|
);
|
||||||
@ -140,6 +154,14 @@
|
|||||||
class="grow text-lg text-info"
|
class="grow text-lg text-info"
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
<label class={"input input-bordered flex items-center gap-2 "}>
|
||||||
|
Адрес пополнения:
|
||||||
|
<input
|
||||||
|
bind:value={userData.deposit_address}
|
||||||
|
type="text"
|
||||||
|
class="grow text-lg text-info"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
<select
|
<select
|
||||||
bind:value={value_role}
|
bind:value={value_role}
|
||||||
class="select select-bordered w-full text-base"
|
class="select select-bordered w-full text-base"
|
||||||
|
@ -20,21 +20,21 @@ const config = {
|
|||||||
prerender: {
|
prerender: {
|
||||||
// default: true,
|
// default: true,
|
||||||
entries: [
|
entries: [
|
||||||
"/user/change/sampleToken",
|
"/admin/user/change/sampleToken",
|
||||||
"/user/edit/req/sampleToken/sampleReqID",
|
"/admin/user/edit/req/sampleToken/sampleReqID",
|
||||||
"/user/neworder/sampleToken",
|
"/admin/user/neworder/sampleToken",
|
||||||
"/user/profile/sampleToken",
|
"/admin/user/profile/sampleToken",
|
||||||
"/",
|
"/admin/",
|
||||||
"/login",
|
"/admin/login",
|
||||||
"/newuser",
|
"/admin/newuser",
|
||||||
"/userslist",
|
"/admin/userslist",
|
||||||
"/disputes",
|
"/admin/disputes",
|
||||||
"/payouts",
|
"/admin/payouts",
|
||||||
"/merchants",
|
"/admin/merchants",
|
||||||
"/orders",
|
"/admin/orders",
|
||||||
"/currencies",
|
"/admin/currencies",
|
||||||
"/sms",
|
"/admin/sms",
|
||||||
"/withdrawals"
|
"/admin/withdrawals",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user