fix whoopsie lol
parent
399518fed9
commit
6022129f99
|
@ -31,13 +31,13 @@ def buy_hat(v, hat_id):
|
|||
if request.values.get("mb"):
|
||||
if v.procoins < hat.price: return {"error": "Not enough marseybux."}, 400
|
||||
v.procoins -= hat.price
|
||||
hat.author.procoins = hat.price * 0.05
|
||||
hat.author.procoins += hat.price * 0.05
|
||||
currency = "marseybux"
|
||||
else:
|
||||
if v.coins < hat.price: return {"error": "Not enough coins."}, 400
|
||||
v.coins -= hat.price
|
||||
v.coins_spent_on_hats += hat.price
|
||||
hat.author.coins = hat.price * 0.05
|
||||
hat.author.coins += hat.price * 0.05
|
||||
currency = "coins"
|
||||
|
||||
new_hat = Hat(user_id=v.id, hat_id=hat.id)
|
||||
|
|
Loading…
Reference in New Issue