Skip to content

Commit 04d9171

Browse files
authored
Merge pull request #15 from vishnuvinay89/all-saas-0.2-dev
Send tenantid of each user in user list
2 parents 8b5ecd8 + 8c37352 commit 04d9171

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/adapters/postgres/user-adapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,13 +489,13 @@ async searchUser(
489489
//Get user core fields data
490490
const query = `SELECT U."userId", U."username", U."email", U."name", R."name" AS role,
491491
U."mobile", U."createdBy", U."updatedBy", U."createdAt", U."updatedAt",
492-
U.status
492+
U.status,UTM."tenantId"
493493
FROM public."Users" U
494494
JOIN public."UserTenantMapping" UTM ON U."userId" = UTM."userId"
495495
LEFT JOIN public."CohortMembers" CM ON CM."userId" = U."userId"
496496
LEFT JOIN public."UserRolesMapping" UR ON UR."userId" = U."userId"
497497
LEFT JOIN public."Roles" R ON R."roleId" = UR."roleId"
498-
${whereCondition} GROUP BY U."userId", R."name" `; //491 - , COUNT(*) OVER() AS total_count
498+
${whereCondition} GROUP BY U."userId", R."name",UTM."tenantId" `; //491 - , COUNT(*) OVER() AS total_count
499499
// ${orderingCondition} ${offset} ${limit}
500500
let userDetails = await this.usersRepository.query(query);
501501

0 commit comments

Comments
 (0)