Don't return the full user object

This commit is contained in:
Adria Navarro 2023-09-20 10:35:22 +02:00
parent 85be9d6ebd
commit af499412cf
1 changed files with 7 additions and 1 deletions

View File

@ -47,7 +47,13 @@ export async function processOutputBBReferences(
switch (subtype) {
case FieldSubtype.USER:
const { users } = await cache.user.getUsers(ids)
return users
return users.map(u => ({
_id: u._id,
primaryDisplay: u.email,
email: u.email,
firstName: u.firstName,
lastName: u.lastName,
}))
default:
throw utils.unreachable(subtype)