This commit is contained in:
omkieit 2024-09-09 22:30:42 +05:30
parent 3231e5021b
commit 50d695d2b9
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,10 @@ const secret = process.env.SECRET_KEY;
export const signup = async (req, res) => { export const signup = async (req, res) => {
const { title, email, password, firstName, middleName, lastName, termsconditions, userType } = req.body; const { title, email, password, firstName, middleName, lastName, termsconditions, userType } = req.body;
function generateRandomNumber() {
return Math.floor(Math.random() * 90000) + 10000;
}
try { try {
// Check if user already exists // Check if user already exists
const oldUser = await UserModal.findOne({ email }); const oldUser = await UserModal.findOne({ email });