mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-18 15:42:14 +11:00
patch for admin stuffs
This commit is contained in:
parent
e2b73bd19d
commit
07b9afd505
1 changed files with 2 additions and 5 deletions
|
|
@ -89,17 +89,14 @@ module.exports = function (fastify, opts, done) {
|
||||||
req.session.errors = "";
|
req.session.errors = "";
|
||||||
let responsecode;
|
let responsecode;
|
||||||
try {
|
try {
|
||||||
balance = await fetch(`${api}/api/v1/user/balance`, {
|
balance = await fetch(`${api}/api/v1/user/balance?name=${name}`, {
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: req.session.b64,
|
Authorization: req.session.b64,
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
searchParams: {
|
|
||||||
"name": name,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
balance = parseInt(balance.body);
|
balance = parseInt(await balance.text());
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
req.session.errors = `${e}`;
|
req.session.errors = `${e}`;
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue