Merge pull request #12040 from Budibase/return_user_data_on_columns
Return user data on user API
This commit is contained in:
commit
1eebe010f3
|
@ -1580,6 +1580,9 @@ describe.each([
|
||||||
(row: Row) => ({
|
(row: Row) => ({
|
||||||
_id: row._id,
|
_id: row._id,
|
||||||
primaryDisplay: row.email,
|
primaryDisplay: row.email,
|
||||||
|
email: row.email,
|
||||||
|
firstName: row.firstName,
|
||||||
|
lastName: row.lastName,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
])("links - %s", (__, relSchema, dataGenerator, resultMapper) => {
|
])("links - %s", (__, relSchema, dataGenerator, resultMapper) => {
|
||||||
|
|
|
@ -82,6 +82,9 @@ export async function processOutputBBReferences(
|
||||||
return users.map(u => ({
|
return users.map(u => ({
|
||||||
_id: u._id,
|
_id: u._id,
|
||||||
primaryDisplay: u.email,
|
primaryDisplay: u.email,
|
||||||
|
email: u.email,
|
||||||
|
firstName: u.firstName,
|
||||||
|
lastName: u.lastName,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -180,6 +180,9 @@ describe("bbReferenceProcessor", () => {
|
||||||
{
|
{
|
||||||
_id: user._id,
|
_id: user._id,
|
||||||
primaryDisplay: user.email,
|
primaryDisplay: user.email,
|
||||||
|
email: user.email,
|
||||||
|
firstName: user.firstName,
|
||||||
|
lastName: user.lastName,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
expect(cacheGetUsersSpy).toBeCalledTimes(1)
|
expect(cacheGetUsersSpy).toBeCalledTimes(1)
|
||||||
|
@ -204,6 +207,9 @@ describe("bbReferenceProcessor", () => {
|
||||||
[user1, user2].map(u => ({
|
[user1, user2].map(u => ({
|
||||||
_id: u._id,
|
_id: u._id,
|
||||||
primaryDisplay: u.email,
|
primaryDisplay: u.email,
|
||||||
|
email: u.email,
|
||||||
|
firstName: u.firstName,
|
||||||
|
lastName: u.lastName,
|
||||||
}))
|
}))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue