Had a small error on the groups

This commit is contained in:
Tiago Ribeiro
2024-09-08 18:00:47 +01:00
parent e6528392a2
commit e49a325074

View File

@@ -64,10 +64,7 @@ export const getUserNamedGroup = async (id: string, name: string) => {
}; };
export const getUsersGroups = async (ids: string[]) => { export const getUsersGroups = async (ids: string[]) => {
return await db return await db.collection("groups").find<Group>({admin: ids}).toArray();
.collection("groups")
.find<Group>({admin: {$in: ids}})
.toArray();
}; };
export const getAllAssignersByCorporate = async (corporateID: string): Promise<string[]> => { export const getAllAssignersByCorporate = async (corporateID: string): Promise<string[]> => {