forked from rDrama/rDrama
fdsf
parent
4ff8065202
commit
df39f55bae
|
@ -94,21 +94,16 @@ def admins(v):
|
||||||
@app.get("/log")
|
@app.get("/log")
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def log(v):
|
def log(v):
|
||||||
return render_template("modlog.html", v=v)
|
|
||||||
|
|
||||||
# @app.get("/log")
|
page=int(request.args.get("page",1))
|
||||||
# @auth_desired
|
|
||||||
# def log(v):
|
|
||||||
|
|
||||||
# page=int(request.args.get("page",1))
|
if v and v.admin_level == 6: actions = g.db.query(ModAction).order_by(ModAction.id.desc()).offset(25 * (page - 1)).limit(26).all()
|
||||||
|
else: actions=g.db.query(ModAction).filter(ModAction.kind!="shadowban", ModAction.kind!="unshadowban", ModAction.kind!="club", ModAction.kind!="unclub").order_by(ModAction.id.desc()).offset(25*(page-1)).limit(26).all()
|
||||||
|
|
||||||
# if v and v.admin_level == 6: actions = g.db.query(ModAction).order_by(ModAction.id.desc()).offset(25 * (page - 1)).limit(26).all()
|
next_exists=len(actions)==26
|
||||||
# else: actions=g.db.query(ModAction).filter(ModAction.kind!="shadowban", ModAction.kind!="unshadowban", ModAction.kind!="club", ModAction.kind!="unclub").order_by(ModAction.id.desc()).offset(25*(page-1)).limit(26).all()
|
actions=actions[:25]
|
||||||
|
|
||||||
# next_exists=len(actions)==26
|
return render_template("log.html", v=v, actions=actions, next_exists=next_exists, page=page)
|
||||||
# actions=actions[:25]
|
|
||||||
|
|
||||||
# return render_template("log.html", v=v, actions=actions, next_exists=next_exists, page=page)
|
|
||||||
|
|
||||||
@app.get("/log/<id>")
|
@app.get("/log/<id>")
|
||||||
@auth_desired
|
@auth_desired
|
||||||
|
|
Loading…
Reference in New Issue