From 1ec4b4c6b7fc3f0a7f91b52797669612c061761e Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 13 Jan 2025 10:38:00 +0000 Subject: [PATCH] Fix this reference --- .../src/pages/builder/portal/users/users/index.svelte | 1 + packages/builder/src/stores/portal/users.ts | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/users/users/index.svelte b/packages/builder/src/pages/builder/portal/users/users/index.svelte index 97120c55d4..c77e40c964 100644 --- a/packages/builder/src/pages/builder/portal/users/users/index.svelte +++ b/packages/builder/src/pages/builder/portal/users/users/index.svelte @@ -251,6 +251,7 @@ passwordModal.show() await fetch.refresh() } catch (error) { + console.error(error) notifications.error("Error creating user") } } diff --git a/packages/builder/src/stores/portal/users.ts b/packages/builder/src/stores/portal/users.ts index 1beb73a6c0..6503fc9280 100644 --- a/packages/builder/src/stores/portal/users.ts +++ b/packages/builder/src/stores/portal/users.ts @@ -29,13 +29,11 @@ class UserStore extends BudiStore { data: [], }) - this.search = this.search.bind(this) - // Update quotas after any add or remove operation - this.create = this.refreshUsage(this.create) - this.save = this.refreshUsage(this.save) - this.delete = this.refreshUsage(this.delete) - this.bulkDelete = this.refreshUsage(this.bulkDelete) + this.create = this.refreshUsage(this.create.bind(this)) + this.save = this.refreshUsage(this.save.bind(this)) + this.delete = this.refreshUsage(this.delete.bind(this)) + this.bulkDelete = this.refreshUsage(this.bulkDelete.bind(this)) } async search(opts: SearchUsersRequest = {}) {