Merge branch 'master' of ssh.dev.azure.com:v3/HackKu/HackKu%202020/backend

This commit is contained in:
garrettmills
2020-02-08 02:39:40 -06:00
10 changed files with 155 additions and 20 deletions

View File

@@ -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