mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 19:56:27 +00:00
Emit structured stdout logs and harden transaction handling
This commit is contained in:
@@ -81,9 +81,7 @@ const loginPartnerUser = async (req, res, next) => {
|
||||
// })}`
|
||||
// );
|
||||
|
||||
console.log(
|
||||
`${uniqueCode} [ REQUEST LOGIN-PARTNER-USER ]: ${JSON.stringify(result)}`
|
||||
);
|
||||
winston.logger.info(`${uniqueCode} [ REQUEST LOGIN-PARTNER-USER ]`);
|
||||
|
||||
// validate
|
||||
let err = validationResult(req);
|
||||
@@ -380,7 +378,7 @@ const loginTerminal = async (req, res, next) => {
|
||||
|
||||
// log info
|
||||
winston.logger.info(
|
||||
`${uniqueCode} [ RESPONSE LOGIN-TERMINAL ]: ${JSON.stringify(result)}`
|
||||
`${uniqueCode} [ RESPONSE LOGIN-TERMINAL ] code=${result.code}`
|
||||
);
|
||||
|
||||
return res.status(200).json(result);
|
||||
|
||||
Reference in New Issue
Block a user