done
This commit is contained in:
parent
3231e5021b
commit
50d695d2b9
|
@ -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 });
|
||||||
|
|
Loading…
Reference in New Issue