Skip to content

Commit

Permalink
Merge pull request #16 from jeroentvb/logout-fix
Browse files Browse the repository at this point in the history
Fixed logout bug
  • Loading branch information
jeroentvb authored May 2, 2019
2 parents 8e9924d + 2815ad1 commit 04a13a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module.exports = express()
.get('/login', render.page)
.post('/sign-in', user.login)

.get('/sign-out', user.logout)
.get('/logout', user.logout)

.use(render.notFound)
.listen(config.port, () => console.log(chalk.green(`[Server] listening on port ${config.port}...`)))
2 changes: 1 addition & 1 deletion modules/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ function logout (req, res) {

return
}
res.redirect('/')
res.redirect('/login')
})
}

Expand Down
2 changes: 1 addition & 1 deletion templates/partials/nav.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<li><a href="/add-session"><%= lang.menu.add_session %></a></li>
<li><a href="/preferences"><%= lang.menu.preferences %></a></li>
<li><a href="/account"><%= lang.menu.account %></a></li>
<li><a href="/sign-out"><%= lang.menu.logout %></a></li>
<li><a href="/logout"><%= lang.menu.logout %></a></li>
<% } else { %>
<li><a href="/login"><%= lang.menu.login %></a></li>
<% } %>
Expand Down

0 comments on commit 04a13a2

Please sign in to comment.