mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-05 11:06:28 +00:00
update
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user