From c43bfda45df9acac45ca136156a41046547283b3 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 6 Nov 2023 12:38:10 +0000 Subject: [PATCH] Fix for user invitations throwing a 501 error due to the way the search was being performed. --- .../app/[application]/_components/BuilderSidePanel.svelte | 4 ++-- packages/frontend-core/src/fetch/UserFetch.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte b/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte index f9a40b09a6..a67c2d3c61 100644 --- a/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte +++ b/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte @@ -112,9 +112,9 @@ } await usersFetch.update({ query: { - appId: query || !filterByAppAccess ? null : prodAppId, - email: query, + string: { email: query }, }, + appId: query || !filterByAppAccess ? null : prodAppId, limit: 50, paginate: query || !filterByAppAccess ? null : false, }) diff --git a/packages/frontend-core/src/fetch/UserFetch.js b/packages/frontend-core/src/fetch/UserFetch.js index b1478c3a6d..65bfe36058 100644 --- a/packages/frontend-core/src/fetch/UserFetch.js +++ b/packages/frontend-core/src/fetch/UserFetch.js @@ -33,7 +33,7 @@ export default class UserFetch extends DataFetch { let finalQuery // convert old format to new one - we now allow use of the lucene format const { appId, paginated, ...rest } = query - if (!LuceneUtils.hasFilters(query) && rest.email) { + if (!LuceneUtils.hasFilters(query) && rest.email != null) { finalQuery = { string: { email: rest.email } } } else { finalQuery = rest