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.
24 lines
550 B
24 lines
550 B
const { Controller } = require('libflitter')
|
|
|
|
/*
|
|
* 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 {
|
|
|
|
/*
|
|
* Serve the main welcome page.
|
|
*/
|
|
welcome(req, res){
|
|
if ( req.user ) {
|
|
return res.redirect('/app')
|
|
} else {
|
|
return res.redirect('/auth/login')
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = Home
|