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

export default requireAuth;