mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2026-03-22 04:27:15 +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;
|
||||
req.session.successes = [];
|
||||
req.session.errors = [];
|
||||
|
||||
console.log(amount)
|
||||
amount = parseInt(amount, 10)
|
||||
console.log(amount)
|
||||
try {
|
||||
patch = await got.post(`${api}/api/v1/admin/impact_balance`, {
|
||||
headers: {
|
||||
|
|
@ -167,7 +169,7 @@ module.exports = function (fastify, opts, done) {
|
|||
},
|
||||
json: {
|
||||
name: name,
|
||||
amount: parseInt(amount),
|
||||
amount: amount,
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
|
|
@ -175,6 +177,7 @@ module.exports = function (fastify, opts, done) {
|
|||
console.log(e.response.body);
|
||||
}
|
||||
if (patch) {
|
||||
req.session.set("errors", "")
|
||||
req.session.set("successes", "Change Funds Successful");
|
||||
}
|
||||
res.redirect("/admin");
|
||||
|
|
|
|||
Loading…
Reference in a new issue