Removing await.
This commit is contained in:
parent
c2e5427860
commit
fb0e4c2c40
|
@ -1,26 +1,25 @@
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
ModalContent,
|
|
||||||
Body,
|
Body,
|
||||||
Layout,
|
|
||||||
Link,
|
|
||||||
notifications,
|
|
||||||
FancyCheckboxGroup,
|
FancyCheckboxGroup,
|
||||||
InlineAlert,
|
InlineAlert,
|
||||||
|
Layout,
|
||||||
|
Link,
|
||||||
|
ModalContent,
|
||||||
|
notifications,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { IntegrationNames, IntegrationTypes } from "constants/backend"
|
import { IntegrationNames, IntegrationTypes } from "constants/backend"
|
||||||
import GoogleButton from "../_components/GoogleButton.svelte"
|
import GoogleButton from "../_components/GoogleButton.svelte"
|
||||||
import { organisation } from "stores/portal"
|
import { organisation } from "stores/portal"
|
||||||
import { onMount, onDestroy } from "svelte"
|
import { onDestroy, onMount } from "svelte"
|
||||||
import {
|
import {
|
||||||
validateDatasourceConfig,
|
|
||||||
getDatasourceInfo,
|
getDatasourceInfo,
|
||||||
|
saveDatasource,
|
||||||
|
validateDatasourceConfig,
|
||||||
} from "builderStore/datasource"
|
} from "builderStore/datasource"
|
||||||
import cloneDeep from "lodash/cloneDeepWith"
|
import cloneDeep from "lodash/cloneDeepWith"
|
||||||
import IntegrationConfigForm from "../TableIntegrationMenu/IntegrationConfigForm.svelte"
|
import IntegrationConfigForm from "../TableIntegrationMenu/IntegrationConfigForm.svelte"
|
||||||
import { goto } from "@roxi/routify"
|
import { goto } from "@roxi/routify"
|
||||||
|
|
||||||
import { saveDatasource } from "builderStore/datasource"
|
|
||||||
import { DatasourceFeature } from "@budibase/types"
|
import { DatasourceFeature } from "@budibase/types"
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
|
|
||||||
|
@ -75,11 +74,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const resp = await saveDatasource(datasource, {
|
datasource = await saveDatasource(datasource, {
|
||||||
tablesFilter: selectedSheets,
|
tablesFilter: selectedSheets,
|
||||||
skipFetch: true,
|
skipFetch: true,
|
||||||
})
|
})
|
||||||
datasource = resp
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
notifications.error(err?.message ?? "Error saving datasource")
|
notifications.error(err?.message ?? "Error saving datasource")
|
||||||
// prevent the modal from closing
|
// prevent the modal from closing
|
||||||
|
@ -142,9 +140,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// This will handle the user closing the modal pressing outside the modal
|
// This will handle the user closing the modal pressing outside the modal
|
||||||
onDestroy(async () => {
|
onDestroy(() => {
|
||||||
if (step === GoogleDatasouceConfigStep.SET_SHEETS) {
|
if (step === GoogleDatasouceConfigStep.SET_SHEETS) {
|
||||||
await $goto(`./datasource/${datasource._id}`)
|
$goto(`./datasource/${datasource._id}`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue