mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-05 11:06:28 +00:00
bug fixing
This commit is contained in:
@@ -300,10 +300,11 @@ const insertLoadingBalance = async (
|
||||
.transacting(trx)
|
||||
.insert(data)
|
||||
.returning('i_load_balance')
|
||||
console.log("resp insertLoadingBalance", resp)
|
||||
.then((resp) => {
|
||||
console.log("resp insertLoadingBalance", resp)
|
||||
let id = resp[0];
|
||||
let loadDetail = [];
|
||||
console.log("detail insertLoadingBalance", detail)
|
||||
detail.forEach((element) => {
|
||||
loadDetail.push({
|
||||
i_load_balance: id.i_load_balance,
|
||||
@@ -334,6 +335,7 @@ const insertLoadingBalance = async (
|
||||
.insert(data);
|
||||
})
|
||||
.then((history) => {
|
||||
console.log("history insertLoadingBalance", history)
|
||||
let id = history[0];
|
||||
let loadDetail = [];
|
||||
detail.forEach((element) => {
|
||||
@@ -398,11 +400,11 @@ const insertLoadingBalance = async (
|
||||
.catch(trx.rollback);
|
||||
})
|
||||
.then((result) => {
|
||||
console.log(result);
|
||||
console.log("result insertLoadingBalance", result);
|
||||
return result.rowCount;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error.message);
|
||||
console.log("error.message insertLoadingBalance", error.message);
|
||||
return error.message;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user