feat: Add more info to admin user
All checks were successful
Build Docker / Build Docker (push) Successful in 27s

This commit is contained in:
2024-06-14 16:39:58 +10:00
parent 6eab11e168
commit 78209641b7
2 changed files with 20 additions and 1 deletions

View File

@@ -58,11 +58,14 @@ def home():
return redirect(next_page)
return redirect("/")
user = current_user()
users = []
if user:
clients = OAuth2Client.query.filter_by(user_id=user.id).all()
if user.id == 1:
clients = OAuth2Client.query.all()
users = User.query.all()
users = [{"id": user.id, "username": user.username} for user in users]
if next_page:
return redirect(next_page)
@@ -82,7 +85,7 @@ def home():
return render_template("home.html", user=user, clients=clients, address=address, hnsid=hnsid)
return render_template("home.html", user=user, clients=clients, address=address, hnsid=hnsid, users=users)
@bp.route("/hnsid", methods=["POST"])
def hnsid():