Skip to content

Commit

Permalink
Merge pull request #15 from vishnuvinay89/all-saas-0.2-dev
Browse files Browse the repository at this point in the history
Send tenantid of each user in user list
  • Loading branch information
sudeeppr1998 authored Jan 14, 2025
2 parents 8b5ecd8 + 8c37352 commit 04d9171
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/adapters/postgres/user-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,13 +489,13 @@ async searchUser(
//Get user core fields data
const query = `SELECT U."userId", U."username", U."email", U."name", R."name" AS role,
U."mobile", U."createdBy", U."updatedBy", U."createdAt", U."updatedAt",
U.status
U.status,UTM."tenantId"
FROM public."Users" U
JOIN public."UserTenantMapping" UTM ON U."userId" = UTM."userId"
LEFT JOIN public."CohortMembers" CM ON CM."userId" = U."userId"
LEFT JOIN public."UserRolesMapping" UR ON UR."userId" = U."userId"
LEFT JOIN public."Roles" R ON R."roleId" = UR."roleId"
${whereCondition} GROUP BY U."userId", R."name" `; //491 - , COUNT(*) OVER() AS total_count
${whereCondition} GROUP BY U."userId", R."name",UTM."tenantId" `; //491 - , COUNT(*) OVER() AS total_count
// ${orderingCondition} ${offset} ${limit}
let userDetails = await this.usersRepository.query(query);

Expand Down

0 comments on commit 04d9171

Please sign in to comment.