From 50d695d2b9bac51538dc7a35065e2cb4112d7831 Mon Sep 17 00:00:00 2001 From: omkieit Date: Mon, 9 Sep 2024 22:30:42 +0530 Subject: [PATCH] done --- ef-api/controllers/user.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ef-api/controllers/user.js b/ef-api/controllers/user.js index 215ecc7..55c19b2 100644 --- a/ef-api/controllers/user.js +++ b/ef-api/controllers/user.js @@ -11,6 +11,10 @@ const secret = process.env.SECRET_KEY; export const signup = async (req, res) => { const { title, email, password, firstName, middleName, lastName, termsconditions, userType } = req.body; + function generateRandomNumber() { + return Math.floor(Math.random() * 90000) + 10000; + } + try { // Check if user already exists const oldUser = await UserModal.findOne({ email });