19 lines
488 B
Python
19 lines
488 B
Python
from flask import Blueprint, render_template
|
|
from flask_login import login_required, current_user
|
|
|
|
bp = Blueprint('core_ui', __name__, template_folder='templates')
|
|
|
|
@bp.route('/')
|
|
def home():
|
|
return render_template('core_ui/home.html')
|
|
|
|
@bp.route('/admin')
|
|
@login_required
|
|
def admin_dashboard():
|
|
if current_user.role != 'admin':
|
|
return "Access denied", 403
|
|
return render_template('core_ui/admin_dashboard.html')
|
|
|
|
@bp.route('/health')
|
|
def health():
|
|
return 'OK', 200 |