feat(routes/panel.py): add panel.py route blueprint
This commit is contained in:
27
src/judas_server/web/routes/panel.py
Normal file
27
src/judas_server/web/routes/panel.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import annotations
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import flask
|
||||
import flask_login
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from werkzeug.wrappers import Response
|
||||
|
||||
panel_bp: flask.Blueprint = flask.Blueprint(
|
||||
"panel", __name__, url_prefix="/panel"
|
||||
)
|
||||
|
||||
|
||||
@panel_bp.route("/")
|
||||
@flask_login.login_required
|
||||
def panel() -> str:
|
||||
"""Renders the main panel page with PC details.
|
||||
|
||||
Returns:
|
||||
Rendered HTML template with PC details.
|
||||
"""
|
||||
return flask.render_template(
|
||||
"panel.html", username=flask_login.current_user.id, pcs={}
|
||||
)
|
||||
Reference in New Issue
Block a user