From bcdc1a9709040cc865c7f2bd200ec39d35a1136c Mon Sep 17 00:00:00 2001 From: Terje Karlsen Date: Sun, 8 Oct 2023 10:09:17 +0200 Subject: [PATCH] Logger ut unleash sync status --- src/server/api-handlers/features.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/server/api-handlers/features.ts b/src/server/api-handlers/features.ts index c71492640..a8a2bfffd 100644 --- a/src/server/api-handlers/features.ts +++ b/src/server/api-handlers/features.ts @@ -9,17 +9,12 @@ const initializeUnleash = async () => { return false; } - console.log(`Initializing unleash with ${UNLEASH_SERVER_API_URL}`); - console.log(`Initializing unleash token ${UNLEASH_SERVER_API_TOKEN}`); - try { unleashInstance = initialize({ url: `${UNLEASH_SERVER_API_URL}/api/`, appName: 'nav-dekoratoren', customHeaders: { Authorization: UNLEASH_SERVER_API_TOKEN }, }); - - console.log(unleashInstance.isSynchronized() ? 'Unleash is synchronized' : 'Unleash is not synchronized'); } catch (e) { console.error('Error initializing unleash', e); } @@ -34,6 +29,7 @@ export const getFeaturesHandler: RequestHandler = async (req, res) => { if (!unleashInstance) { await initializeUnleash(); } + console.log(unleashInstance.isSynchronized() ? 'Unleash is synchronized' : 'Unleash is not synchronized'); // res.status(500).send('Missing UNLEASH_SERVER_API_TOKEN or UNLEASH_SERVER_API_URL');