Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Logger ut unleash sync status
Browse files Browse the repository at this point in the history
  • Loading branch information
terjeofnorway committed Oct 8, 2023
1 parent ceb113a commit bcdc1a9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/server/api-handlers/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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');

Expand Down

0 comments on commit bcdc1a9

Please sign in to comment.