This commit is contained in:
2022-05-27 17:11:29 +07:00
parent dc0a5da1dc
commit 800a4b01b8
2 changed files with 18 additions and 0 deletions
@@ -149,6 +149,15 @@ const loadingBalanceRequest = async (req, res) => {
});
}
// check total amount topup
if (parseInt(amountTopup) <= 0) {
return res.status(200).json({
code: "403",
message: "can't topup with amount = 0",
data: {},
});
}
// get BI regulation status
const getBIRegulationStatus = await model.getBIRegulationStatus();
if (getBIRegulationStatus.c_value == "A") {
@@ -67,6 +67,15 @@ const reservation = async (req, res) => {
});
}
// check reservation amount
if (parseInt(amount) <= 0) {
return res.status(200).json({
code: "403",
message: "amount must be greater than 0",
data: {},
});
}
// get BI regulation status
const getBIRegulationStatus = await model.getBIRegulationStatus();
if (getBIRegulationStatus.c_value == "A") {