mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 17:26:27 +00:00
update
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
const winston = require('../../helpers/winston.logger');
|
||||
|
||||
const knex = require('../../../infrastructure/database/knex');
|
||||
|
||||
// CHECK CARD NUMBER
|
||||
@@ -379,7 +381,12 @@ const insertLoadingBalance = async (
|
||||
});
|
||||
})
|
||||
.then(trx.commit)
|
||||
.catch(trx.rollback);
|
||||
.catch((err) => {
|
||||
winston.logger.warn(
|
||||
`${uniqueCode} ERRORRRRRRR ROLLBACK ${JSON.stringify(err.message)}`
|
||||
);
|
||||
trx.rollback;
|
||||
});
|
||||
})
|
||||
.then((result) => {
|
||||
// console.log(result);
|
||||
@@ -387,6 +394,9 @@ const insertLoadingBalance = async (
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error.message);
|
||||
winston.logger.warn(
|
||||
`${uniqueCode} ERRORRRRRRR CATCH ${JSON.stringify(err.message)}`
|
||||
);
|
||||
return error.message;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user