summaryrefslogtreecommitdiff
path: root/server/controllers/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/users.js')
-rw-r--r--server/controllers/users.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/controllers/users.js b/server/controllers/users.js
index 23b5013..4637f87 100644
--- a/server/controllers/users.js
+++ b/server/controllers/users.js
@@ -95,13 +95,14 @@ const updateUser = async (req, res) => {
);
if (!user.aadhaarNumber) {
+ let aadhaarnum=generateAadhaar()
await UserDetails.findByIdAndUpdate(id, {
- $set: { aadhaarNumber: generateAadhaar() },
+ $set: { aadhaarNumber: aadhaarnum },
});
-
+console.log(user)
sendSMS(
- user.mobile,
- `Dear ${user.name}, your Aadhaar Number is ${user.aadhaarNumber} for the EID ${user._id}.`
+ `+91${user.mobile}`,
+ `Dear ${user.name}, your Aadhaar Number is ${aadhaarnum} for the EID ${user._id}.`
);
}