Browse Source

fix: get users list function for base user

pull/7202/head
mertmit 12 months ago
parent
commit
269bffe904
  1. 12
      packages/nocodb/src/models/BaseUser.ts

12
packages/nocodb/src/models/BaseUser.ts

@ -82,8 +82,8 @@ export default class BaseUser {
query, query,
}: { }: {
base_id: string; base_id: string;
limit: number; limit?: number;
offset: number; offset?: number;
query?: string; query?: string;
}, },
ncMeta = Noco.ncMeta, ncMeta = Noco.ncMeta,
@ -98,9 +98,11 @@ export default class BaseUser {
`${MetaTable.USERS}.created_at as created_at`, `${MetaTable.USERS}.created_at as created_at`,
`${MetaTable.PROJECT_USERS}.base_id`, `${MetaTable.PROJECT_USERS}.base_id`,
`${MetaTable.PROJECT_USERS}.roles as roles`, `${MetaTable.PROJECT_USERS}.roles as roles`,
) );
.offset(offset)
.limit(limit); if (limit) {
queryBuilder.offset(offset).limit(limit);
}
if (query) { if (query) {
queryBuilder.where('email', 'like', `%${query.toLowerCase?.()}%`); queryBuilder.where('email', 'like', `%${query.toLowerCase?.()}%`);

Loading…
Cancel
Save