Skip to content

Commit

Permalink
Update addEventMemberRoute.js
Browse files Browse the repository at this point in the history
  • Loading branch information
joyc7 committed Dec 7, 2023
1 parent f9c5371 commit 4af245e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions back-end/routes/addEventMemberRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ router.get("/friendsList/:userId", async (req, res) => {
try {
//fetch all data
const userId = req.params.userId;
console.log("userId:", userId);
const userWithFriends = await User.findById(userId).populate({
path: "friends",
model: "User",
});
console.log(userWithFriends);
if (!userWithFriends) {
return res.status(404).send("User not found");
}
Expand Down

0 comments on commit 4af245e

Please sign in to comment.