Connected set new password to backend

This commit is contained in:
Alex Holliday committed 2024-06-11 14:18:20 -07:00
1 parent d1427010c2
commit a8af106606
5 files changed
+105 -19

No files matched your search

+3 -2
View File
@@ -131,7 +131,6 @@ const validateRecoveryToken = async (req, res) => {
const resetPassword = async (req, res) => {
try {
const newPassword = req.body.password;
// Validate token again
const recoveryToken = await validateRecoveryToken(req, res);
const user = await UserModel.findOne({ email: recoveryToken.email });
@@ -148,7 +147,9 @@ const resetPassword = async (req, res) => {
} else {
throw new Error("User not found");
}
} catch (error) {}
} catch (error) {
throw error;
}
};
//****************************************