From 0a7669ad2d7687347fa7478cf177ebefc075cf0d Mon Sep 17 00:00:00 2001 From: Dean Date: Mon, 5 Jun 2023 16:26:27 +0100 Subject: [PATCH] PR feedback --- .../src/api/controllers/global/configs.ts | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/worker/src/api/controllers/global/configs.ts b/packages/worker/src/api/controllers/global/configs.ts index 03da8cce88..0f22d4aae0 100644 --- a/packages/worker/src/api/controllers/global/configs.ts +++ b/packages/worker/src/api/controllers/global/configs.ts @@ -337,6 +337,16 @@ export async function publicSettings( ) } + // enrich the favicon url - empty url means deleted + const faviconUrl = + branding.faviconUrl && branding.faviconUrl !== "" + ? objectStore.getGlobalFileUrl( + "settings", + "faviconUrl", + branding.faviconUrlEtag + ) + : undefined + // google const googleConfig = await configs.getGoogleConfig() const googleDatasourceConfigured = @@ -360,15 +370,7 @@ export async function publicSettings( config: { ...config, ...branding, - ...(branding.faviconUrl && branding.faviconUrl !== "" - ? { - faviconUrl: objectStore.getGlobalFileUrl( - "settings", - "faviconUrl", - branding.faviconUrlEtag - ), - } - : { faviconUrl: undefined }), + ...{ faviconUrl }, google, googleDatasourceConfigured, oidc,