1
0
Fork 0

fix: don't clear projection

fix-1
Paul Makles 2023-07-31 14:46:04 +01:00
parent b77e545159
commit 7144d889e8
No known key found for this signature in database
GPG Key ID: 5059F398521BB0F6
1 changed files with 10 additions and 10 deletions

View File

@ -125,11 +125,11 @@ export async function fetchUserById(id: string) {
.findOne(
{ _id: id },
{
projection: {
relations: (await hasPermissionFromSession("users/fetch/relations"))
? 1
: 0,
},
projection: (await hasPermissionFromSession("users/fetch/relations"))
? undefined
: {
relations: 0,
},
}
);
}
@ -143,11 +143,11 @@ export async function fetchUsersById(ids: string[]) {
.find(
{ _id: { $in: ids } },
{
projection: {
relations: (await hasPermissionFromSession("users/fetch/relations"))
? 1
: 0,
},
projection: (await hasPermissionFromSession("users/fetch/relations"))
? undefined
: {
relations: 0,
},
}
)
.toArray();