summaryrefslogtreecommitdiff
path: root/controllers/root/logout.js
blob: 078df9a07e8599f3dc0fed0177f1cc09644d2b2f (plain)
1
2
3
4
5
6
7
export function logout_get(req, res) {
	if (req.session.user !== undefined) {
		res.clearCookie("JDMSessionId");
		req.session.destroy();
	}
	return res.redirect(302, "/");
}