show truescore in admin.patrons and order by it

pull/143/head
Aevann 2023-05-03 17:47:06 +03:00
parent 90127ffa27
commit 514fb320cf
2 changed files with 3 additions and 1 deletions

View File

@ -130,7 +130,7 @@ def daily_chart(v:User):
@limiter.limit(DEFAULT_RATELIMIT, key_func=get_ID)
@admin_level_required(PERMS['VIEW_PATRONS'])
def patrons(v):
users = g.db.query(User).filter(User.patron > 0).order_by(User.patron.desc(), User.id).all()
users = g.db.query(User).filter(User.patron > 0).order_by(User.patron.desc(), User.truescore.desc()).all()
return render_template("admin/patrons.html", v=v, users=users, benefactor_def=AWARDS['benefactor'])

View File

@ -7,6 +7,7 @@
<th>#</th>
<th>Name</th>
<th>Tier</th>
<th>Truescore</th>
</tr>
</thead>
{% for user in users %}
@ -16,6 +17,7 @@
<td>
<img class="contain" alt="2{{user.patron}}" loading="lazy" width=29.33 height=32 src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/badges/2{{user.patron}}.webp?x=6">
</td>
<td>{{user.truescore}}</td>
</tr>
{% endfor %}
</table>