setGroupMembership(group)
Arguments
groups (Record<string, Array<string>>): Groups in which user belongs to
Returns
(Promise): Returns the user object with id and group
Example
// create group
const group: Record<string, string[]> = {};
group["teacherId"] = ["t1", "t2", "t3"];
group["classId"] = ["c1"];
setGroupMembership(group);
// Result of promise
/*
{
id: "user1",
group: {
"teacherId": ["t1", "t2", "t3"],
"classId": ["c1"]
}
}
*/