login improvements

This commit is contained in:
2025-05-26 21:50:49 +02:00
parent 029815c218
commit a198fa3e0e
5 changed files with 67 additions and 16 deletions

View File

@@ -27,9 +27,9 @@ def init_routes(main_bp):
@main_bp.route('/')
def home():
if current_user.is_authenticated:
return redirect(url_for('main.dashboard'))
return render_template('home.html')
if not current_user.is_authenticated:
return redirect(url_for('auth.login'))
return redirect(url_for('main.dashboard'))
@main_bp.route('/dashboard')
@login_required