remotes/1693045480750635534/spooky-22
Aevann1 2021-10-21 21:25:58 +02:00
parent 6fb8328b9c
commit 1bde12ce55
3 changed files with 4 additions and 0 deletions

View File

@ -61,6 +61,7 @@ class User(Base):
fail_utc = Column(Integer, default=0)
fail2_utc = Column(Integer, default=0)
admin_level = Column(Integer, default=0)
coins_spent = Column(Integer, default=0)
agendaposter = Column(Boolean, default=False)
agendaposter_expires_utc = Column(Integer, default=0)
changelogsub = Column(Boolean, default=False)

View File

@ -318,6 +318,7 @@ def buy(v, award):
if v.coins < price: return {"error": "Not enough coins."}, 400
v.coins -= price
v.coins_spent += price
g.db.add(v)
g.db.flush()

View File

@ -316,6 +316,7 @@
{% endfor %}
</ul>
True score: {{u.truecoins}}
Coins spent: {{u.coins_spent}}
{% endif %}
{% if u.is_suspended %}
<p>Banned by: <a href="{{u.banned_by.url}}">@{{u.banned_by.username}}</a></p>
@ -582,6 +583,7 @@
{% endfor %}
</ul>
True score: {{u.truecoins}}
Coins spent: {{u.coins_spent}}
{% endif %}
{% if u.is_suspended %}
<p>Banned by: <a href="{{u.banned_by.url}}">@{{u.banned_by.username}}</a></p>