Tidied up login page/navbar.
This commit is contained in:
parent
478edeeddf
commit
3eddd0ea5b
5 changed files with 21 additions and 2 deletions
|
|
@ -29,6 +29,12 @@ module.exports.get = async function(req, res){
|
|||
//Check for validation errors
|
||||
const validResult = validationResult(req);
|
||||
|
||||
//If this request is coming from someone who's already logged in
|
||||
if(req.session.user != null){
|
||||
//Redirect them to the homepage
|
||||
return res.redirect('/');
|
||||
}
|
||||
|
||||
//If there are none
|
||||
if(validResult.isEmpty()){
|
||||
//Get username from sanatized/validated data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue