forked from rDrama/rDrama
order holes by time created cuz it makes the most sense
parent
0052925c07
commit
667b5c0388
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue