From 31555cc6605717d154d5b7c9ec679eb08701da74 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Thu, 12 May 2022 15:30:32 +0100 Subject: [PATCH] Revert "Adding to the REST query UI to make it more obvious when it needs saved, such as the user has changed a dynamic variable." This reverts commit fb1f941c7673fcb0f765c43066224744e9ab0cb8. --- .../rest/[query]/index.svelte | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte index d2914146ce..2baa6aab41 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte @@ -37,7 +37,7 @@ import AccessLevelSelect from "components/integration/AccessLevelSelect.svelte" import DynamicVariableModal from "../../_components/DynamicVariableModal.svelte" import Placeholder from "assets/bb-spaceship.svg" - import { cloneDeep, isEqual } from "lodash/fp" + import { cloneDeep } from "lodash/fp" import { RawRestBodyTypes } from "constants/backend" let query, datasource @@ -47,7 +47,6 @@ let response, schema, enabledHeaders let authConfigId let dynamicVariables, addVariableModal, varBinding - let baseQuery, baseDatasource, baseVariables $: datasourceType = datasource?.source $: integrationInfo = $integrations[datasourceType] @@ -63,15 +62,6 @@ $: hasSchema = Object.keys(schema || {}).length !== 0 || Object.keys(query?.schema || {}).length !== 0 - $: baseQuery = !baseQuery ? cloneDeep(query) : baseQuery - $: baseDatasource = !baseDatasource ? cloneDeep(datasource) : baseDatasource - $: baseVariables = !baseVariables - ? cloneDeep(dynamicVariables) - : baseVariables - $: hasChanged = - !isEqual(baseQuery, query) || - !isEqual(baseDatasource, datasource) || - !isEqual(baseVariables, dynamicVariables) function getSelectedQuery() { return cloneDeep( @@ -130,9 +120,6 @@ datasource.config.dynamicVariables = rebuildVariables(saveId) datasource = await datasources.save(datasource) } - baseQuery = query - baseDatasource = datasource - baseVariables = dynamicVariables } catch (err) { notifications.error(`Error saving query`) } @@ -346,7 +333,7 @@