From 4f5e831b22473e0a9fd17d11b901d40dbbb58a58 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 22 Oct 2024 21:48:03 +0100 Subject: [PATCH] PR comments --- .../builder/src/pages/builder/portal/settings/ai/index.svelte | 3 +-- packages/worker/src/api/controllers/global/configs.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/settings/ai/index.svelte b/packages/builder/src/pages/builder/portal/settings/ai/index.svelte index 9a70fd289a..bbdf46a24e 100644 --- a/packages/builder/src/pages/builder/portal/settings/ai/index.svelte +++ b/packages/builder/src/pages/builder/portal/settings/ai/index.svelte @@ -31,8 +31,7 @@ async function fetchAIConfig() { try { - const aiDoc = await API.getConfig(ConfigTypes.AI) - fullAIConfig = aiDoc + fullAIConfig = await API.getConfig(ConfigTypes.AI) } catch (error) { notifications.error("Error fetching AI config") } diff --git a/packages/worker/src/api/controllers/global/configs.ts b/packages/worker/src/api/controllers/global/configs.ts index 5d9768443b..750b02088c 100644 --- a/packages/worker/src/api/controllers/global/configs.ts +++ b/packages/worker/src/api/controllers/global/configs.ts @@ -44,7 +44,7 @@ const getEventFns = async (config: Config, existing?: Config) => { fns.push(events.email.SMTPCreated) } else if (isAIConfig(config)) { fns.push(() => events.ai.AIConfigCreated) - fns.push(() => pro.quotas.addCustomAIConfig) + fns.push(() => pro.quotas.addCustomAIConfig()) } else if (isGoogleConfig(config)) { fns.push(() => events.auth.SSOCreated(ConfigType.GOOGLE)) if (config.config.activated) {