forked from rDrama/rDrama
1
0
Fork 0

order holes by time created cuz it makes the most sense

master
Aevann 2024-02-07 06:09:10 +02:00
parent 0052925c07
commit 667b5c0388
2 changed files with 3 additions and 3 deletions

View File

@ -736,9 +736,9 @@ def hole_marsey(v, hole):
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
@auth_required
def subs(v):
subs = g.db.query(Hole, func.count(Post.hole)).outerjoin(Post, Hole.name == Post.hole).group_by(Hole.name).order_by(func.count(Post.hole).desc()).all()
holes = g.db.query(Hole, func.count(Post.hole)).outerjoin(Post, Hole.name == Post.hole).group_by(Hole.name).order_by(hole.created_utc).all()
total_users = g.db.query(User).count()
return render_template('hole/holes.html', v=v, subs=subs, total_users=total_users)
return render_template('hole/holes.html', v=v, holes=holes, total_users=total_users)
@app.post("/hole_pin/<int:pid>")
@limiter.limit('1/second', scope=rpath)

View File

@ -15,7 +15,7 @@
</tr>
</thead>
{% for hole, count in subs %}
{% for hole, count in holes %}
<tr>
<td>{{loop.index}}</td>
<td><a href="/h/{{hole}}">{{hole}} {% if hole.name in v.hole_blocks %}<span class="text-danger">[blocked, visit it to unblock it]</span>{% endif %}</a></td>