mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 20:29:35 +02:00
add get money funcs
This commit is contained in:
@@ -22,25 +22,26 @@ export async function Post(url = "", data = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
export async function GetCurrentMoney(authToken) {
|
||||
export async function GetCurrentMoney(authToken, searchToken) {
|
||||
|
||||
try {
|
||||
const response = await fetch(`${BackendApiUrl}/Payment/GetCurrentMoney`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'AuthToken': authToken,
|
||||
}
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
const response = await fetch(`${BackendApiUrl}/Payment/GetCurrentMoney`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'AUTHTOKEN': authToken,
|
||||
'SearchToken': searchToken
|
||||
}
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
console.log(data); // Здесь вы можете обработать полученные данные
|
||||
return data;
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
console.log(data); // Здесь вы можете обработать полученные данные
|
||||
return data;
|
||||
} catch (error) {
|
||||
console.error('There was a problem with the fetch operation:', error);
|
||||
console.error('There was a problem with the fetch operation:', error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user