diff --git a/packages/builder/src/pages/builder/portal/settings/general.svelte b/packages/builder/src/pages/builder/portal/settings/general.svelte index 802bac6ecb..7223e6dd0c 100644 --- a/packages/builder/src/pages/builder/portal/settings/general.svelte +++ b/packages/builder/src/pages/builder/portal/settings/general.svelte @@ -25,9 +25,6 @@ } let loading = false - - let company - let logoUrl let file async function uploadLogo() { @@ -41,19 +38,18 @@ async function saveConfig() { loading = true await toggleAnalytics() - const res = await uploadLogo() - console.log(res) - // console.log("company", company) - // const res = await organisation.save({ - // company: company || $organisation?.config?.company, - // // logoUrl, - // // platformUrl, - // }) - // if (res.status === 200) { - // notifications.success("General settings saved.") - // } else { - // notifications.danger("Error when saving settings.") - // } + if (file) { + await uploadLogo() + } + const res = await organisation.save({ + company: $organisation.company, + platformUrl: $organisation.platformUrl, + }) + if (res.status === 200) { + notifications.success("Settings saved.") + } else { + notifications.error(res.message) + } loading = false } @@ -76,18 +72,13 @@