From cc0e11e5b0de3bde76b1b0f16deeaf57079d7ce4 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 8 Sep 2021 10:40:23 +0200 Subject: [PATCH] fd --- files/routes/awards.py | 3 +++ files/templates/shop.html | 1 + 2 files changed, 4 insertions(+) diff --git a/files/routes/awards.py b/files/routes/awards.py index 469450196..2e373f4cb 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -63,6 +63,7 @@ def shop(v): def buy(v, award): if award not in AWARDS: abort(400) price = AWARDS[award]["price"] + print(price) if v.coins < price: return render_template("shop.html", v=v, error="You don't have enough coins to buy this item.") v.coins -= price g.db.add(v) @@ -70,6 +71,8 @@ def buy(v, award): award = AwardRelationship(user_id=v.id, kind=award) g.db.add(award) + print(award) + return render_template("shop.html", awards=list(AWARDS.values()), v=v) diff --git a/files/templates/shop.html b/files/templates/shop.html index 55629cc9a..441462a2c 100644 --- a/files/templates/shop.html +++ b/files/templates/shop.html @@ -41,6 +41,7 @@ Icon Title Price + Buy