Continued creating the entity system

This commit is contained in:
Tiago Ribeiro
2024-10-01 17:39:43 +01:00
parent bae02e5192
commit 564e6438cb
37 changed files with 2522 additions and 130 deletions

View File

@@ -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();