summaryrefslogtreecommitdiff
path: root/middlewares/requireAuth.js
blob: 1ea6deb19045bd64d0d94f65b23ac9047d69ac9e (plain)
1
2
3
4
5
6
7
8
function requireAuth(req, res, next) {
	if (req.session.user !== undefined) {
		return next();
	}
	return res.redirect(302, "/login");
}

export default requireAuth;