Skip to content

Commit

Permalink
fix reset password
Browse files Browse the repository at this point in the history
  • Loading branch information
Freeassassin committed Aug 14, 2023
1 parent 15c8dfe commit 678f947
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/controllers/UserController.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const UserController = {
const { email, password, token } = req.body;
const result = await UserServices.validatePasswordResetToken(token);
const existingUser = await UserServices.getUserByEmail(email);
if (!existingUser || existingUser.email !== result) {
if (!existingUser || existingUser.email !== result.email) {
next(new Error('INVALID_PASSWORD_RESET_EMAIL'));
} else {
await UserServices.updatePassword(email, password);
Expand Down

0 comments on commit 678f947

Please sign in to comment.