Started working on the assignments page
This commit is contained in:
@@ -84,6 +84,12 @@ export const getAllAssignersByCorporate = async (corporateID: string, type: Type
|
||||
return [...linkedTeachers.users.map((x) => x.id), ...linkedCorporates.users.map((x) => x.id)];
|
||||
};
|
||||
|
||||
export const getGroupsForEntities = async (ids: string[]) =>
|
||||
await db
|
||||
.collection("groups")
|
||||
.find<Group>({entity: {$in: ids}})
|
||||
.toArray();
|
||||
|
||||
export const getGroupsForUser = async (admin?: string, participant?: string) => {
|
||||
if (admin && participant) return await db.collection("groups").find<Group>({admin, participant}).toArray();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user