diff --git a/src/controllers/groupController.js b/src/controllers/groupController.js index 5ce1e55..1da67cd 100644 --- a/src/controllers/groupController.js +++ b/src/controllers/groupController.js @@ -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