mirror of https://gitgud.io/fatchan/jschan.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
373 B
19 lines
373 B
'use strict';
|
|
|
|
module.exports = (req, res) => {
|
|
|
|
//send home if already logged in
|
|
if (req.session.authenticated === true) {
|
|
return res.status(400).render('message', {
|
|
'title': 'Notice',
|
|
'message': 'You are already logged in. Redirecting you to back home.',
|
|
'redirect': '/'
|
|
});
|
|
}
|
|
|
|
//render the page
|
|
res.render('register', {
|
|
csrf: req.csrfToken()
|
|
});
|
|
|
|
}
|
|
|