Skip to content
Permalink
Browse files
fixed header bug
  • Loading branch information
aa7401 committed Jul 2, 2018
1 parent 7510c68 commit b18f7324806908d6d89fdf610f9e9c861c247d1d
Showing 1 changed file with 2 additions and 2 deletions.
@@ -41,7 +41,7 @@ const db = new sqlite3.Database('./auth.db', err => {
})

app.get('/', (req, res) => {
if(!req.session.authenticated) res.redirect('/login')
if(!req.session.authenticated) return res.redirect('/login')
res.sendFile(`${__dirname}/html/index.html`)
})

@@ -58,7 +58,7 @@ app.post('/register', (req, res) => {
console.log(sql)
db.run(sql, err => {
if(err) console.error(err.message)
res.redirect('/')
return res.redirect('/')
})
})
})

0 comments on commit b18f732

Please sign in to comment.