Skip to content

Commit

Permalink
fix admin topup not working
Browse files Browse the repository at this point in the history
  • Loading branch information
deadly-nightshade committed Nov 1, 2024
1 parent 0714797 commit ac4252e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/api/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ router.post("/addMoney", async (req, res) => {
return res.status(400).json({ message: "Amount must be a string" })
}

if (amount.lte(0)) {
if (Number(amount) <= 0) {
return res.status(400).json({ message: "Amount must be positive" })
}

if (!amount.isFinite()) {
if (!isFinite(Number(amount))) {
return res.status(400).json({ message: "No scamming" })
}

Expand Down

0 comments on commit ac4252e

Please sign in to comment.