fixed dash path

This commit is contained in:
2020-02-08 23:29:10 -06:00
parent cc195169c4
commit 7fd4e99649
3 changed files with 156 additions and 160 deletions

View File

@@ -1,4 +1,4 @@
const Controller = require('libflitter/controller/Controller')
const Controller = require('libflitter/controller/Controller');
/*
* Home Controller
@@ -7,26 +7,28 @@ const Controller = require('libflitter/controller/Controller')
* are used as handlers for routes specified in the route files.
*/
class Home extends Controller {
static get services(){
return [...super.services, 'configs']
}
static get services() {
return [...super.services, 'configs'];
}
/*
* Serve the main welcome page.
*/
welcome(req, res) {
/*
* Serve the main welcome page.
* Return the welcome view.
* The page() method is added by Flitter and passes some
* helpful contextual data to the view as well.
*/
welcome(req, res){
/*
* 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){
const AppName = this.configs.get('app.name')
return res.page('login', {AppName})
}
return res.page('welcome', { user: req.user });
}
async get_login(req, res) {
const AppName = this.configs.get('app.name');
return res.page('login', { AppName });
}
toApp(req, res) {
return res.redirect('/i');
}
}
module.exports = Home
module.exports = Home;