1) added html regex
2) added welcome user
3) change forgotpassword and resetpassword to ejs
This commit is contained in:
newtbot
2024-01-21 21:06:10 +08:00
parent a749d91425
commit 877eaeae43
26 changed files with 2630 additions and 5320 deletions

View File

@ -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,
},
],
},

View File

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