populate createdBy on list users
This commit is contained in:
@@ -138,7 +138,8 @@ export async function listUsers(user: AuthenticatedUser) {
|
||||
.select(
|
||||
"_id pid orgId firstName lastName name email role avatar status createdAt createdBy lastLogin"
|
||||
)
|
||||
.populate({ path: "orgId", select: "_id pid name avatar" });
|
||||
.populate({ path: "orgId", select: "_id pid name avatar" })
|
||||
.populate({ path: "createdBy", select: "_id pid name avatar" });
|
||||
}
|
||||
|
||||
return await userModel
|
||||
@@ -146,7 +147,8 @@ export async function listUsers(user: AuthenticatedUser) {
|
||||
.select(
|
||||
"_id pid orgId firstName lastName name email role avatar status createdAt createdBy lastLogin"
|
||||
)
|
||||
.populate({ path: "orgId", select: "_id pid name avatar" });
|
||||
.populate({ path: "orgId", select: "_id pid name avatar" })
|
||||
.populate({ path: "createdBy", select: "_id pid name avatar" });
|
||||
}
|
||||
|
||||
export async function updateUser(
|
||||
|
||||
Reference in New Issue
Block a user