change update status to in progress to last statement

This commit is contained in:
2023-02-14 06:26:04 +07:00
parent 162c742e76
commit 25f66afa7b
@@ -321,14 +321,6 @@ const loadingBalanceRequest = async (req, res) => {
i++;
});
// log debug
winston.logger.debug(
`${uniqueCode} updating status reservation to in progress...`
);
// update status to in progress
await model.updateStatusReservation(reservationNumberTemp, now);
totalReservation = i;
if (totalReservation == 0) {
result = {
@@ -442,6 +434,14 @@ const loadingBalanceRequest = async (req, res) => {
}
}
// log debug
winston.logger.debug(
`${uniqueCode} updating status reservation to in progress...`
);
// update status to in progress
await model.updateStatusReservation(reservationNumberTemp, now);
result = {
code: '00',
message: 'reservation exists',