mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 01:23:48 +01:00
Add ability to filter audit log
This commit is contained in:
parent
2653071886
commit
3b56ef7148
@ -37,6 +37,10 @@ def audit():
|
|||||||
abort(404)
|
abort(404)
|
||||||
query = query.filter_by(causer=user)
|
query = query.filter_by(causer=user)
|
||||||
|
|
||||||
|
if "q" in request.args:
|
||||||
|
q = request.args["q"]
|
||||||
|
query = query.filter(AuditLogEntry.title.ilike(f"%{q}%"))
|
||||||
|
|
||||||
pagination = query.paginate(page=page, per_page=num)
|
pagination = query.paginate(page=page, per_page=num)
|
||||||
return render_template("admin/audit.html", log=pagination.items, pagination=pagination)
|
return render_template("admin/audit.html", log=pagination.items, pagination=pagination)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user