forked from MarseyWorld/MarseyWorld
dsf
parent
1c6ca7c9e0
commit
c8c6ec6eea
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue