Continued creating the entity system
This commit is contained in:
@@ -116,3 +116,11 @@ export const getCorporateNameForStudent = async (studentID: string) => {
|
||||
|
||||
return "";
|
||||
};
|
||||
|
||||
export const getGroupsByEntity = async (id: string) => await db.collection("groups").find<Group>({entity: id}).toArray();
|
||||
|
||||
export const getGroupsByEntities = async (ids: string[]) =>
|
||||
await db
|
||||
.collection("groups")
|
||||
.find<Group>({entity: {$in: ids}})
|
||||
.toArray();
|
||||
|
||||
Reference in New Issue
Block a user