Avoid “findOneAndUpdate” for Password Updates in Mongoose
Hello GUYS!
Here is how we gonna write the "update password " controller together
1. Grab an old and new password from the body2. Now we have to check if we pass both the old and new passwords to req. body3. Great, we have to find a logged-in user,...
saidmounaim.hashnode.dev1 min read