Skip to content

Commit

Permalink
fixed minor logical error in join group while saving role of user
Browse files Browse the repository at this point in the history
  • Loading branch information
abhiraj-ku committed Sep 12, 2024
1 parent 6e5731a commit 8747867
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/groupController.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports.joinGroup = async (req, res) => {
}

// Add the user to the group
group.members.push({ user: req.user.id });
group.members.push({ user: req.user.id, role: "member" });
await group.save();

// Return a success message
Expand Down

0 comments on commit 8747867

Please sign in to comment.