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_TEST = "https://test.0x000f.ru/api/v1/";
|
||||
|
||||
let BasicURLValue = API_PATH_MAIN;
|
||||
export const API_PATH_VALUE = API_PATH_MAIN;
|
||||
|
||||
async function makePost(
|
||||
url,
|
||||
@ -33,7 +33,7 @@ async function makePost(
|
||||
errorProcessor = defaultErrorProcessor
|
||||
) {
|
||||
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);
|
||||
} catch (error) {
|
||||
return errorProcessor(error);
|
||||
@ -48,7 +48,7 @@ async function makeGet(
|
||||
errorProcessor = defaultErrorProcessor
|
||||
) {
|
||||
try {
|
||||
const res = await axios.get(BasicURLValue + url, options);
|
||||
const res = await axios.get(API_PATH_VALUE + url, options);
|
||||
return responseProcessor(res, dataResponseProcessor);
|
||||
} catch (error) {
|
||||
return errorProcessor(error);
|
||||
@ -56,7 +56,6 @@ async function makeGet(
|
||||
}
|
||||
|
||||
export {
|
||||
BasicURLValue,
|
||||
makePost,
|
||||
makeGet,
|
||||
defaultResponseProcessor,
|
||||
|
@ -3,6 +3,7 @@
|
||||
import {
|
||||
API_PATH_TEST,
|
||||
API_PATH_MAIN,
|
||||
API_PATH_VALUE,
|
||||
makePost,
|
||||
} from "$lib/tools/requests/requests";
|
||||
import { sayError, sayInfo } from "$lib/tools/toaster/Toaster";
|
||||
@ -164,7 +165,7 @@
|
||||
showLoadingReceiptShowing = true;
|
||||
try {
|
||||
const response = await axios.get(
|
||||
API_PATH_MAIN + "loadFile?dispute=" + selectedDispute["order_id"],
|
||||
API_PATH_VALUE + "loadFile?dispute=" + selectedDispute["order_id"],
|
||||
// "17731",
|
||||
{
|
||||
responseType: "blob",
|
||||
@ -286,8 +287,12 @@
|
||||
<div
|
||||
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">
|
||||
<p class="self-center opacity-60 text-center ">ID: {selectedDispute["order_id"]}</p>
|
||||
<div
|
||||
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
|
||||
class={"self-center text-3xl text-center " +
|
||||
disputesStatusMapColors[selectedDispute["order_status"]]}
|
||||
@ -341,7 +346,7 @@
|
||||
on:click={() => {
|
||||
axios
|
||||
.get(
|
||||
API_PATH_MAIN +
|
||||
API_PATH_VALUE +
|
||||
"loadFile?dispute=" +
|
||||
selectedDispute["order_id"],
|
||||
{
|
||||
|
@ -6,6 +6,7 @@
|
||||
API_PATH_TEST,
|
||||
API_PATH_MAIN,
|
||||
makePost,
|
||||
API_PATH_VALUE,
|
||||
} from "$lib/tools/requests/requests";
|
||||
import { sayError, sayInfo } from "$lib/tools/toaster/Toaster";
|
||||
import Pagination from "$lib/ui-components/pagination.svelte";
|
||||
@ -689,7 +690,7 @@
|
||||
on:click={() => {
|
||||
axios
|
||||
.get(
|
||||
API_PATH_MAIN +
|
||||
API_PATH_VALUE +
|
||||
"admin/loadFile?payout=" +
|
||||
selectedPayout["uuid"],
|
||||
{
|
||||
|
@ -20,10 +20,19 @@
|
||||
userData.balance,
|
||||
value_role,
|
||||
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);
|
||||
// bid = Number(balance);
|
||||
console.log(name, surname, balance, role, bid, payout_bid);
|
||||
@ -52,6 +61,10 @@
|
||||
canChangeUser = false;
|
||||
return;
|
||||
}
|
||||
if (deposit_address.length < 28) {
|
||||
canChangeUser = false;
|
||||
return;
|
||||
}
|
||||
canChangeUser = true;
|
||||
}
|
||||
|
||||
@ -70,6 +83,7 @@
|
||||
role: value_role,
|
||||
bid: userData.bid.toString(),
|
||||
payout_bid: userData.payout_bid.toString(),
|
||||
deposit_address: userData.deposit_address,
|
||||
},
|
||||
makeAuthHeaderForAxios(getAuthInfo()?.a)
|
||||
);
|
||||
@ -140,6 +154,14 @@
|
||||
class="grow text-lg text-info"
|
||||
/>
|
||||
</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
|
||||
bind:value={value_role}
|
||||
class="select select-bordered w-full text-base"
|
||||
|
@ -20,21 +20,21 @@ const config = {
|
||||
prerender: {
|
||||
// default: true,
|
||||
entries: [
|
||||
"/user/change/sampleToken",
|
||||
"/user/edit/req/sampleToken/sampleReqID",
|
||||
"/user/neworder/sampleToken",
|
||||
"/user/profile/sampleToken",
|
||||
"/",
|
||||
"/login",
|
||||
"/newuser",
|
||||
"/userslist",
|
||||
"/disputes",
|
||||
"/payouts",
|
||||
"/merchants",
|
||||
"/orders",
|
||||
"/currencies",
|
||||
"/sms",
|
||||
"/withdrawals"
|
||||
"/admin/user/change/sampleToken",
|
||||
"/admin/user/edit/req/sampleToken/sampleReqID",
|
||||
"/admin/user/neworder/sampleToken",
|
||||
"/admin/user/profile/sampleToken",
|
||||
"/admin/",
|
||||
"/admin/login",
|
||||
"/admin/newuser",
|
||||
"/admin/userslist",
|
||||
"/admin/disputes",
|
||||
"/admin/payouts",
|
||||
"/admin/merchants",
|
||||
"/admin/orders",
|
||||
"/admin/currencies",
|
||||
"/admin/sms",
|
||||
"/admin/withdrawals",
|
||||
],
|
||||
},
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user