Big progress update!

This commit is contained in:
oitsjustjose 2020-07-04 14:16:57 -05:00
commit 9348cb1926
11 changed files with 761 additions and 6 deletions

View file

@ -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) => {