summaryrefslogtreecommitdiff
path: root/server/controllers/users.js
diff options
context:
space:
mode:
authorBlaster4385 <venkateshchaturvedi12@gmail.com>2023-04-28 22:26:44 +0530
committerBlaster4385 <venkatesh@tablaster.dev>2024-12-17 11:47:49 +0530
commit8e9f74c0e85477a1bf40be121571a8aee6631563 (patch)
tree4bdda8fc58fd2a8062ee37b10f462ef9d8df6296 /server/controllers/users.js
parent36b171c6ddeae8ca3d2486228b72563752c1cc32 (diff)
misc fixesHEADmain
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}.`
);
}