mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 17:46:27 +00:00
update
This commit is contained in:
@@ -2116,14 +2116,7 @@ const updateReservationAndLoadingBalance = async (
|
||||
`500 internal server error (max loop) - backend server | ${error.message}`
|
||||
);
|
||||
|
||||
return {
|
||||
code: '500',
|
||||
message:
|
||||
process.env.NODE_ENV != 'production'
|
||||
? error.message
|
||||
: '500 internal server error (max loop) - backend server.',
|
||||
data: {},
|
||||
};
|
||||
return false;
|
||||
}
|
||||
|
||||
maxLoop++;
|
||||
@@ -2228,36 +2221,10 @@ const updateReservationAndLoadingBalance = async (
|
||||
c_category: 'T',
|
||||
});
|
||||
} else {
|
||||
result = {
|
||||
code: '414',
|
||||
message: "reservation doesn't exist",
|
||||
data: {},
|
||||
};
|
||||
|
||||
// log warn
|
||||
winston.logger.warn(
|
||||
`${uniqueCode} RESPONSE load balance validate: ${JSON.stringify(
|
||||
result
|
||||
)}`
|
||||
);
|
||||
|
||||
return res.status(200).json(result);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
result = {
|
||||
code: '414',
|
||||
message: "reservation doesn't exist",
|
||||
data: {},
|
||||
};
|
||||
|
||||
// log warn
|
||||
winston.logger.warn(
|
||||
`${uniqueCode} RESPONSE load balance validate: ${JSON.stringify(
|
||||
result
|
||||
)}`
|
||||
);
|
||||
|
||||
return res.status(200).json(result);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1017,7 +1017,7 @@ const updateReservationAndInsertLoadingBalance = async (
|
||||
.catch(trx.rollback);
|
||||
})
|
||||
.then((result) => {
|
||||
// console.log(result);
|
||||
console.log(result);
|
||||
return result.rowCount;
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user