Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
req.family.admins.forEach(function(admin) {
req.family.admins.remove(admin);
});
req.family.members.filter(function(member) {
return member.parent;
}).forEach(function(member) {
req.family.addAdmin(member);
});
req.family.save(function(err) {
if(err) {
return next(new exception.Fatal(err));
} else {
return next(req.family);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.