From 635f7f271e20100a9d68600949244ca508bd624d Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Wed, 25 Dec 2024 11:32:25 +1100 Subject: [PATCH] Redirect from landing to dashboard if authenticated --- app/routes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/routes.py b/app/routes.py index 8ba9a4d..a9b4d98 100644 --- a/app/routes.py +++ b/app/routes.py @@ -49,6 +49,8 @@ def logout(): @main.route('/', methods=['GET']) def landing(): + if current_user.is_authenticated: + return redirect(url_for('main.dashboard')) return render_template('landing.html') @main.route('/dashboard', methods=['GET', 'POST'])