Skip to content

Commit 7275698

Browse files
ci: project is ready for contribution
1 parent bbb38ea commit 7275698

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/routes/route.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ router.get('/', (req,res) => {
3838
})
3939

4040
router.post('/search', (req, res) => {
41-
if (req.session.isLoggedIn) {
41+
if (!req.session.isLoggedIn) {
4242
res.redirect('/login');
4343
return;
4444
}
@@ -48,7 +48,7 @@ router.post('/search', (req, res) => {
4848
return;
4949
}
5050
console.log(results)
51-
res.render('products',{products:results});
51+
res.render('products',{products:results, isLoggedIn:req.session.isLoggedIn});
5252
});
5353
})
5454

0 commit comments

Comments
 (0)