@budibase/backend-core 2.11.40 → 2.11.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6902,12 +6902,14 @@ var PAGE_LIMIT = 8;
6902
6902
  var paginatedUsers = async ({
6903
6903
  bookmark,
6904
6904
  query,
6905
- appId
6905
+ appId,
6906
+ limit
6906
6907
  } = {}) => {
6907
6908
  const db = getGlobalDB();
6909
+ const pageLimit = limit ? limit + 1 : PAGE_LIMIT + 1;
6908
6910
  const opts = {
6909
6911
  include_docs: true,
6910
- limit: PAGE_LIMIT + 1
6912
+ limit: pageLimit
6911
6913
  };
6912
6914
  if (bookmark) {
6913
6915
  opts.startkey = bookmark;
@@ -6925,7 +6927,7 @@ var paginatedUsers = async ({
6925
6927
  const response = await db.allDocs(getGlobalUserParams(null, opts));
6926
6928
  userList = response.rows.map((row) => row.doc);
6927
6929
  }
6928
- return pagination(userList, PAGE_LIMIT, {
6930
+ return pagination(userList, pageLimit, {
6929
6931
  paginate: true,
6930
6932
  property,
6931
6933
  getKey
@@ -9885,14 +9887,14 @@ var UserDB = class _UserDB {
9885
9887
  userCount: response.length
9886
9888
  };
9887
9889
  }
9888
- static async getUsersByAppAccess(appId) {
9889
- const opts = {
9890
+ static async getUsersByAppAccess(opts) {
9891
+ const params2 = {
9890
9892
  include_docs: true,
9891
- limit: 50
9893
+ limit: opts.limit || 50
9892
9894
  };
9893
9895
  let response = await searchGlobalUsersByAppAccess(
9894
- appId,
9895
- opts
9896
+ opts.appId,
9897
+ params2
9896
9898
  );
9897
9899
  return response;
9898
9900
  }