Reset password returns a token

This commit is contained in:
Alex Holliday committed 2024-07-16 14:06:51 -07:00
1 parent a2bb096d20
commit ce200eeb20
2 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -220,7 +220,8 @@ const resetPassword = async (req, res) => {
})
.select("-password")
.select("-profileImage");
return userWithoutPassword;
const token = issueToken(userWithoutPassword);
return token;
} else {
throw new Error(errorMessages.DB_USER_NOT_FOUND);
}