mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 23:36:28 +00:00
bug fixed
This commit is contained in:
@@ -301,11 +301,8 @@ const insertLoadingBalance = async (
|
||||
.insert(data)
|
||||
.returning('i_load_balance')
|
||||
.then((resp) => {
|
||||
console.log("resp insertLoadingBalance", resp)
|
||||
let id = resp[0];
|
||||
console.log("id resp insertLoadingBalance", id)
|
||||
let loadDetail = [];
|
||||
console.log("detail insertLoadingBalance", detail)
|
||||
detail.forEach((element) => {
|
||||
loadDetail.push({
|
||||
i_load_balance: id,
|
||||
@@ -336,9 +333,7 @@ const insertLoadingBalance = async (
|
||||
.insert(data);
|
||||
})
|
||||
.then((history) => {
|
||||
console.log("history insertLoadingBalance", history)
|
||||
let id = history[0];
|
||||
console.log("id history insertLoadingBalance", id)
|
||||
let loadDetail = [];
|
||||
detail.forEach((element) => {
|
||||
loadDetail.push({
|
||||
@@ -402,11 +397,21 @@ const insertLoadingBalance = async (
|
||||
.catch(trx.rollback);
|
||||
})
|
||||
.then((result) => {
|
||||
console.log("result insertLoadingBalance", result);
|
||||
winston.logger.info(
|
||||
`${uniqueCode} [ RESULT INSERT-LOADING-BALANCE ]: ${JSON.stringify(
|
||||
result
|
||||
)}`
|
||||
);
|
||||
// console.log("result insertLoadingBalance", result);
|
||||
return result.rowCount;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("error.message insertLoadingBalance", error.message);
|
||||
winston.logger.info(
|
||||
`${uniqueCode} [ RESULT ERROR INSERT-LOADING-BALANCE ]: ${JSON.stringify(
|
||||
error.message
|
||||
)}`
|
||||
);
|
||||
// console.log("error.message insertLoadingBalance", error.message);
|
||||
return error.message;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user