From 3857700ea07eb15dd0e5773fdcda2c7b3d9b4452 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 30 Jan 2023 17:03:20 +0000 Subject: [PATCH] Some missing async handling. --- .../TableIntegrationMenu/IntegrationConfigForm.svelte | 4 ++-- .../rest/auth/RestAuthenticationModal.svelte | 4 ++-- .../portal/environment/CreateEditVariableModal.svelte | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte index 56b619f5f8..95b266e85b 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte @@ -79,8 +79,8 @@ .map(([key]) => key) } - function save(data) { - environment.createVariable(data) + async function save(data) { + await environment.createVariable(data) config[selectedKey] = `{{ env.${data.name} }}` createVariableModal.hide() } diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/auth/RestAuthenticationModal.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/auth/RestAuthenticationModal.svelte index f4dab4bb61..1f6979704f 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/auth/RestAuthenticationModal.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/auth/RestAuthenticationModal.svelte @@ -171,8 +171,8 @@ } } - const save = data => { - environment.createVariable(data) + const save = async data => { + await environment.createVariable(data) form.basic[formFieldkey] = `{{ env.${data.name} }}` createVariableModal.hide() } diff --git a/packages/builder/src/components/portal/environment/CreateEditVariableModal.svelte b/packages/builder/src/components/portal/environment/CreateEditVariableModal.svelte index b456a29621..c76cb7d468 100644 --- a/packages/builder/src/components/portal/environment/CreateEditVariableModal.svelte +++ b/packages/builder/src/components/portal/environment/CreateEditVariableModal.svelte @@ -22,9 +22,9 @@ let developmentValue let useProductionValue = true - const deleteVariable = name => { + const deleteVariable = async name => { try { - environment.deleteVariable(name) + await environment.deleteVariable(name) modalContext.hide() notifications.success("Environment variable deleted") } catch (err) { @@ -32,9 +32,9 @@ } } - const saveVariable = () => { + const saveVariable = async () => { try { - save({ + await save({ name, production: productionValue, development: developmentValue,