You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.0 KiB
40 lines
1.0 KiB
const Controller = require('libflitter/controller/Controller')
|
|
|
|
/*
|
|
* Home Controller
|
|
* -------------------------------------------------------------
|
|
* Controller for the main homepage of this Flitter app. Methods here
|
|
* are used as handlers for routes specified in the route files.
|
|
*/
|
|
class Home extends Controller {
|
|
static get services() {
|
|
return [...super.services, 'Vue']
|
|
}
|
|
|
|
/*
|
|
* Serve the main welcome page.
|
|
*/
|
|
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,
|
|
...this.Vue.data(),
|
|
})
|
|
}
|
|
|
|
async tmpl(req, res) {
|
|
return this.Vue.auth_message(res, {
|
|
message: 'This is a test message. Hello, baby girl; I love you very very much!.',
|
|
next_destination: '/auth/login',
|
|
button_text: 'Continue',
|
|
})
|
|
}
|
|
}
|
|
|
|
module.exports = Home
|