fdsfds
This commit is contained in:
parent
c6c5497437
commit
741a8fe01e
1 changed files with 6 additions and 9 deletions
|
@ -184,12 +184,13 @@ def log(v):
|
|||
kind = request.args.get("kind")
|
||||
|
||||
actions = g.db.query(ModAction)
|
||||
if not (v and v.admin_level > 1):
|
||||
actions = actions.filter(ModAction.kind!="shadowban", ModAction.kind!="unshadowban", ModAction.kind!="club", ModAction.kind!="unclub", ModAction.kind!="check")
|
||||
|
||||
if admin_id: actions = actions.filter_by(user_id=admin_id)
|
||||
if kind: actions = actions.filter_by(kind=kind)
|
||||
|
||||
if not (v and v.admin_level > 1):
|
||||
actions = actions.filter(ModAction.kind!="shadowban", ModAction.kind!="unshadowban", ModAction.kind!="club", ModAction.kind!="unclub", ModAction.kind!="check")
|
||||
|
||||
actions = actions.order_by(ModAction.id.desc()).offset(25*(page-1)).limit(26).all()
|
||||
next_exists=len(actions)>25
|
||||
actions=actions[:25]
|
||||
|
@ -215,13 +216,9 @@ def log_item(id, v):
|
|||
if request.path != action.permalink:
|
||||
return redirect(action.permalink)
|
||||
|
||||
return render_template("log.html",
|
||||
v=v,
|
||||
actions=[action],
|
||||
next_exists=False,
|
||||
page=1,
|
||||
action=action
|
||||
)
|
||||
admins = [x[0] for x in g.db.query(User.username).filter(User.admin_level > 1).all()]
|
||||
|
||||
return render_template("log.html", v=v, actions=[action], next_exists=False, page=1, action=action, admins=admins, types=ACTIONTYPES2)
|
||||
|
||||
@app.get("/assets/favicon.ico")
|
||||
def favicon():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue