|
|
@ -15,19 +15,9 @@ class Home extends Controller {
|
|
|
|
* Serve the main welcome page.
|
|
|
|
* Serve the main welcome page.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
welcome(req, res) {
|
|
|
|
welcome(req, res) {
|
|
|
|
if (req.user) {
|
|
|
|
|
|
|
|
// If we have a user, redirect them to the main app
|
|
|
|
|
|
|
|
return res.redirect('/i')
|
|
|
|
return res.redirect('/i')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
* Return the welcome view.
|
|
|
|
|
|
|
|
* The page() method is added by Flitter and passes some
|
|
|
|
|
|
|
|
* helpful contextual data to the view as well.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
return res.page('welcome', { user: req.user });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async get_login(req, res) {
|
|
|
|
async get_login(req, res) {
|
|
|
|
const AppName = this.configs.get('app.name');
|
|
|
|
const AppName = this.configs.get('app.name');
|
|
|
|
return res.page('login', { AppName });
|
|
|
|
return res.page('login', { AppName });
|
|
|
|