From 2d3171cfc9c1ec85a02b682c5189f52b6e4fb00d Mon Sep 17 00:00:00 2001 From: garrettmills Date: Mon, 5 Oct 2020 20:32:11 -0500 Subject: [PATCH] Redirect logged in users away from landing page to app --- app/controllers/Home.controller.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/Home.controller.js b/app/controllers/Home.controller.js index c764ad5..6c3ab35 100644 --- a/app/controllers/Home.controller.js +++ b/app/controllers/Home.controller.js @@ -15,6 +15,11 @@ class Home extends Controller { * Serve the main welcome page. */ welcome(req, res) { + if (req.user) { + // If we have a user, redirect them to the main app + return res.redirect('/i') + } + /* * Return the welcome view. * The page() method is added by Flitter and passes some