update
1) added html regex 2) added welcome user 3) change forgotpassword and resetpassword to ejs
This commit is contained in:
@ -56,15 +56,16 @@ async function addUser(user) {
|
||||
|
||||
//api/v0/auth/login
|
||||
async function loginUser(user) {
|
||||
//console.log(user);
|
||||
//look up username or email in db
|
||||
const userRes = await userModel.findOne({
|
||||
where: {
|
||||
[Op.or]: [
|
||||
{
|
||||
username: user.userInfo,
|
||||
username: user.username,
|
||||
},
|
||||
{
|
||||
email: user.userInfo,
|
||||
email: user.username,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -37,6 +37,9 @@ function isAddress(value){
|
||||
return addressRegex.test(value);
|
||||
}
|
||||
|
||||
//generate me an regex for alpha
|
||||
//https://stackoverflow.com/questions/11522529/regexp-for-alphabets-with-spaces
|
||||
|
||||
module.exports = {
|
||||
isAlphaNumericwithSpaces,
|
||||
isAlphaNumericWithSpacesAndDash,
|
||||
|
Reference in New Issue
Block a user