diff options
-rw-r--r-- | client/src/pages/Update/Agreement/Agreement.jsx | 7 | ||||
-rw-r--r-- | server/controllers/users.js | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/client/src/pages/Update/Agreement/Agreement.jsx b/client/src/pages/Update/Agreement/Agreement.jsx index 8de9738..ac7a644 100644 --- a/client/src/pages/Update/Agreement/Agreement.jsx +++ b/client/src/pages/Update/Agreement/Agreement.jsx @@ -28,7 +28,12 @@ const Agreement = () => { const { userData } = userContext() const updateUse = useMutation( - () => updateUser(userData._id, { ...userData, isUpdating: true }), + () => + updateUser(userData._id, { + ...userData, + isUpdating: true, + verified: false + }), { onSuccess: () => { setConfirm.mutate({ diff --git a/server/controllers/users.js b/server/controllers/users.js index e10df1b..0880657 100644 --- a/server/controllers/users.js +++ b/server/controllers/users.js @@ -99,7 +99,10 @@ const updateUser = async (req, res) => { $set: {aadhaarNumber: generateAadhaar()}, }); - sendSMS(user,mobile, `Dear ${user.name}, your Aadhaar Number is ${user.aadhaarNumber} for the EID ${user._id}.`); + sendSMS( + user.mobile, + `Dear ${user.name}, your Aadhaar Number is ${user.aadhaarNumber} for the EID ${user._id}.` + ); } res.status(200).json({message: 'User Updated Successfully'}); @@ -124,7 +127,7 @@ const getUpdatingUsers = async (req, res) => { try { const updatingUsers = await UserDetails.find({ isUpdating: true, - verified: true, + verified: false, }); return res.status(200).json(updatingUsers); } catch (error) { |