Add user to response

This commit is contained in:
Alex Holliday committed 2024-07-16 14:23:42 -07:00
1 parent 26c4955dde
commit 61d65f700e
2 files changed
+3 -3

No files matched your search

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