Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
annayzhang1337 committed Nov 8, 2023
1 parent e4dbaa6 commit 3083790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const addUserFriendByName = async (req, res) => {
);
}

user.friends.push(friendId);
user.friends.push(friend._id);
friend.friends.push(userId);
await user.save();
await friend.save();
Expand Down

0 comments on commit 3083790

Please sign in to comment.