More tidy up
This commit is contained in:
parent
8df7781dd4
commit
e9b9bbba99
|
@ -7,9 +7,8 @@
|
||||||
import Spinner from "components/common/Spinner.svelte"
|
import Spinner from "components/common/Spinner.svelte"
|
||||||
import { API, Info, User } from "./Steps"
|
import { API, Info, User } from "./Steps"
|
||||||
import Indicator from "./Indicator.svelte"
|
import Indicator from "./Indicator.svelte"
|
||||||
import { Input, TextArea, Button } from "@budibase/bbui"
|
import { Button } from "@budibase/bbui"
|
||||||
import { goto } from "@sveltech/routify"
|
import { goto } from "@sveltech/routify"
|
||||||
import { AppsIcon, InfoIcon, CloseIcon } from "components/common/Icons/"
|
|
||||||
import { fade } from "svelte/transition"
|
import { fade } from "svelte/transition"
|
||||||
import { post } from "builderStore/api"
|
import { post } from "builderStore/api"
|
||||||
import analytics from "analytics"
|
import analytics from "analytics"
|
||||||
|
@ -23,7 +22,7 @@
|
||||||
let isApiKeyValid
|
let isApiKeyValid
|
||||||
let lastApiKey
|
let lastApiKey
|
||||||
let fetchApiKeyPromise
|
let fetchApiKeyPromise
|
||||||
const validateApiKey = async apiKey => {
|
const validateApiKey = async (apiKey) => {
|
||||||
if (!apiKey) return false
|
if (!apiKey) return false
|
||||||
|
|
||||||
// make sure we only fetch once, unless API Key is changed
|
// make sure we only fetch once, unless API Key is changed
|
||||||
|
@ -122,9 +121,7 @@
|
||||||
const fullSchema = Object.assign({}, ...validationSchemas)
|
const fullSchema = Object.assign({}, ...validationSchemas)
|
||||||
|
|
||||||
// Check full form schema
|
// Check full form schema
|
||||||
const formIsValid = await object()
|
const formIsValid = await object().shape(fullSchema).isValid(values)
|
||||||
.shape(fullSchema)
|
|
||||||
.isValid(values)
|
|
||||||
fullFormIsValid = formIsValid
|
fullFormIsValid = formIsValid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue