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