#10 Started on creating front end pages for the admin

This commit is contained in:
2024-02-13 10:04:59 +00:00
parent 7f77dcdd02
commit b6721cc777
4 changed files with 98 additions and 4 deletions

View File

@ -1,9 +1,10 @@
""" The user controller to manage all of the user related endpoints
""" The admin controller to manage all of the admin related endpoints
in the web app
"""
from flask import Blueprint
# from flask import render_template
from flask import render_template, Blueprint
from controllers.database.user import UserController
# Blueprint to append user endpoints to
blueprint = Blueprint("admin", __name__, url_prefix="/admin")
@ -18,4 +19,8 @@ def main_admin():
@blueprint.route('/users/')
def admin_users():
""" Endpoint responsible for managing a users permissions """
return "Hello, Worlds"
# Get all users to create admin table on frontend
db = UserController()
users = db.read_all()
return render_template("index.html", content="admin.html", users=users)