returning org object in list users

This commit is contained in:
2025-05-21 17:51:05 +05:30
parent f0593fd928
commit f887b49f02

View File

@@ -88,7 +88,8 @@ export async function listUsers(tenantId: string) {
.find({ $and: [{ tenantId: tenantId }, { dev: { $ne: true } }] })
.select(
"_id pid orgId firstName lastName name email role avatar status createdAt createdBy lastLogin"
);
)
.populate({ path: "orgId", select: "_id pid name avatar" });
}
export async function updateUser(