This is my code
app.route('/logout')
.get((req, res) => {
req.logout();
res.redirect('/');
});
app.route('/')
.get((req, res) => {
res.render(process.cwd() + '/views/pug/index.pug', {title: "Hello", message: "Please login", showLogin: true});
});
and it i think it is working correctly i.e when a user logout it will redirect it to ‘/’ homepage But i can’t pass the challenge.
This is the error i’m getting in fcc
// running test
When a user logs out they should be redirected to the homepage
// tests completed