mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 20:29:35 +02:00
added API to get-userdata for saper
This commit is contained in:
@@ -25,4 +25,32 @@ export async function GetPercentageSteps(CrystalsCount) {
|
||||
catch (error) {
|
||||
console.log('Fetch Error!')
|
||||
}
|
||||
}
|
||||
|
||||
export async function GetUserData(SearchToken, AuthToken) {
|
||||
const data = {
|
||||
SearchToken: SearchToken,
|
||||
Authtoken: AuthToken
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetch(`${BackendApiUrl}/GameMines/GetCurrentData`, {
|
||||
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')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user