Tidied up login page/navbar.

This commit is contained in:
rainbow napkin 2024-12-28 15:55:03 -05:00
parent 478edeeddf
commit 3eddd0ea5b
5 changed files with 21 additions and 2 deletions

View file

@ -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