Big progress update!
This commit is contained in:
parent
4645561d33
commit
9348cb1926
11 changed files with 761 additions and 6 deletions
|
|
@ -4,11 +4,9 @@ import * as Auth from './auth'
|
|||
|
||||
export const init = (app: Application, passport: PassportStatic) => {
|
||||
app.get('/', async (req, res) => {
|
||||
if (req.isAuthenticated() && req.user) {
|
||||
res.render('home')
|
||||
} else {
|
||||
res.redirect('/login?origin=/')
|
||||
}
|
||||
res.render('home', {
|
||||
user: req.isAuthenticated && req.user ? req.user : null
|
||||
})
|
||||
})
|
||||
|
||||
app.put('/', async (req, res) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue