summaryrefslogtreecommitdiff
path: root/controllers/root/logout.js
blob: d8b1b7579507bd41aaf6be342c40c0026af7e5ad (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, '/');
}