Skip to content
Snippets Groups Projects
Commit 509e411c authored by Ricardo's avatar Ricardo
Browse files

FIX money and cyberpsychosis after purchase becomes Nan, must be fixed ASAP

parent 18823ad8
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,7 @@ export default class implant{
return res.status(404).json({ error: "User or implant not found" });
const bought = await db.select().from(purchasesTable).where(eq(purchasesTable.implant_id, product_id))
if (bought)
if (bought.length > 0)
return res.status(404).json({ error: "Implant was already bought" });
var userMoney = parseFloat(user.money);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment