separating users and admins on admin dashboard #35

Merged
ngolp merged 2 commits from separate-users-admins into 2025 2024-10-22 20:11:34 -04:00
Showing only changes of commit 09ed66f5ae - Show all commits

View file

@ -75,8 +75,7 @@ def mail():
if not current_user.is_admin:
return redirect(url_for("dashboard.home"))
total_count = len(db.session.execute(db.select(User).where(User.is_admin == False)).scalars().all())
# total_count = len(db.session.execute(db.select(User)).scalars().all())
total_count = len(db.session.execute(db.select(User)).scalars().all())
api_key = current_app.config["MCE_API_KEY"]
return render_template("mail.html", NUM_HACKERS=total_count,