diff --git a/packages/builder/src/components/settings/tabs/APIKeys.svelte b/packages/builder/src/components/settings/tabs/APIKeys.svelte index db07755d56..4545cf9b85 100644 --- a/packages/builder/src/components/settings/tabs/APIKeys.svelte +++ b/packages/builder/src/components/settings/tabs/APIKeys.svelte @@ -6,11 +6,10 @@ let keys = { budibase: "", sendGrid: "" } - async function updateKey(e) { - console.log("Event Key: ", e.detail) - // Send to endpoint when it exists - const response = await api.put(`/api/${$store.appId}`, data) - // const res = await response.json() + async function updateKey([key, value]) { + const response = await api.put(`/api/keys/${key}`, { value }) + const res = await response.json() + keys = { ...keys, ...res } } // Get Keys @@ -27,7 +26,7 @@