Task #17 - Created login page added to routing and replaced name mentions with app_name token
This commit is contained in:
@@ -7,12 +7,15 @@ 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']
|
||||
}
|
||||
|
||||
/*
|
||||
* Serve the main welcome page.
|
||||
*/
|
||||
welcome(req, res){
|
||||
|
||||
|
||||
/*
|
||||
* Return the welcome view.
|
||||
* The page() method is added by Flitter and passes some
|
||||
@@ -20,6 +23,10 @@ class Home extends Controller {
|
||||
*/
|
||||
return res.page('welcome', {user: req.user})
|
||||
}
|
||||
async get_login(req, res){
|
||||
const app_name = this.configs.get('app.name')
|
||||
return res.page('login', {app_name})
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Home
|
||||
|
||||
Reference in New Issue
Block a user