dfs
This commit is contained in:
parent
d5a05bf589
commit
c713eb1d9e
3 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue