master
Aevann1 2022-05-26 00:08:16 +02:00
parent 1c6ca7c9e0
commit c8c6ec6eea
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ month = datetime.now().strftime('%B')
@app.get('/admin/loggedin')
@admin_level_required(2)
def loggedin_list(v):
ids = cache.get(f'{SITE}_loggedin').keys()
ids = [x for x,val in cache.get(f'{SITE}_loggedin').items() if time.time()-val<15*60]
users = g.db.query(User).filter(User.id.in_(ids)) \
.order_by(User.admin_level.desc(), User.truecoins.desc()).all()
return render_template("loggedin.html", v=v, users=users)