mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2026-03-22 12:37:13 +11:00
changed some stuff with the parseint in impactbal
This commit is contained in:
parent
660abf3cf4
commit
40115c858a
1 changed files with 5 additions and 2 deletions
|
|
@ -158,7 +158,9 @@ module.exports = function (fastify, opts, done) {
|
||||||
let patch;
|
let patch;
|
||||||
req.session.successes = [];
|
req.session.successes = [];
|
||||||
req.session.errors = [];
|
req.session.errors = [];
|
||||||
|
console.log(amount)
|
||||||
|
amount = parseInt(amount, 10)
|
||||||
|
console.log(amount)
|
||||||
try {
|
try {
|
||||||
patch = await got.post(`${api}/api/v1/admin/impact_balance`, {
|
patch = await got.post(`${api}/api/v1/admin/impact_balance`, {
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -167,7 +169,7 @@ module.exports = function (fastify, opts, done) {
|
||||||
},
|
},
|
||||||
json: {
|
json: {
|
||||||
name: name,
|
name: name,
|
||||||
amount: parseInt(amount),
|
amount: amount,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
@ -175,6 +177,7 @@ module.exports = function (fastify, opts, done) {
|
||||||
console.log(e.response.body);
|
console.log(e.response.body);
|
||||||
}
|
}
|
||||||
if (patch) {
|
if (patch) {
|
||||||
|
req.session.set("errors", "")
|
||||||
req.session.set("successes", "Change Funds Successful");
|
req.session.set("successes", "Change Funds Successful");
|
||||||
}
|
}
|
||||||
res.redirect("/admin");
|
res.redirect("/admin");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue