add warning eror

This commit is contained in:
Kelvin Samuel 2021-11-16 22:07:23 +07:00
parent e07c27d476
commit d1e047a3e7
2 changed files with 11 additions and 8 deletions

View file

@ -150,20 +150,17 @@ exports.login = async function (req, res) {
code: 204,
success: "Sorry You havent verified your email",
});
} else {
} else {
res.render("pages/index");
}
} else {
res.send({
code: 204,
success: "Sorry Email and password does not match",
res.render('pages/login', {
companyName : 'SALAH',
error : 'Wrong Username or Password'
});
}
} else {
res.send({
code: 204,
success: "Sorry Email does not exits",
});
res.render("pages/login-error");
}
}
}

View file

@ -44,6 +44,12 @@
password?</a>
</div>
<button class="btn btn-login btn-primary" type="submit">Login</button>
<% if(locals.error) { %>
<span class="text-danger pl-2" style="font-size: 2.2vh; margin-left: 10%;" ><%= error %></span>
<% } %>
<% if(locals.regisverify) { %>
<span class="text-danger pl-2" style="font-size: 2.2vh; margin-left: 10%;" ><%= error %></span>
<% } %>
<div class="login-with">Or login with
<div class="links">
<div class="google">