mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
28 lines
711 B
JavaScript
28 lines
711 B
JavaScript
import { BackendApiUrl } from '@/properties/Сonfig.js';
|
||
|
||
export async function GetPercentageSteps(CrystalsCount) {
|
||
const data = {
|
||
minesCount: CrystalsCount
|
||
}
|
||
|
||
try {
|
||
const response = await fetch(`${BackendApiUrl}/GameMines/GetMultiplierPercentage`, {
|
||
method: 'POST',
|
||
headers: {
|
||
'Content-Type': 'application/json'
|
||
},
|
||
body: JSON.stringify(data),
|
||
redirect: 'follow'
|
||
})
|
||
|
||
if (!response.ok) {
|
||
console.log('Fetch error:', response.status)
|
||
}
|
||
|
||
console.log(response)
|
||
return await response.json()
|
||
}
|
||
catch (error) {
|
||
console.log('Fetch Error!')
|
||
}
|
||
} |