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

Commit

Permalink
Fjerner glemt console.log og unødig initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
terjeofnorway committed Oct 10, 2023
1 parent cf936b6 commit 6fed8b2
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/server/api-handlers/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,13 @@ const resolveRequestedFeatures = (requestedFeatures: string[]) => {
};

export const getFeaturesHandler: RequestHandler = async (req, res) => {
// If for some reason the unleash instance is not initialized,
// make a new attempt.
if (!unleashInstance) {
await initializeUnleash();
}

const { query } = req;
if (!query?.feature) {
res.status(400).json({ error: 'Missing feature query parameters' });
return;
}

const requestedFeatures: string[] = forceArray(query.feature).filter((feature) => typeof feature === 'string');
console.log(resolveRequestedFeatures(requestedFeatures));
res.json(resolveRequestedFeatures(requestedFeatures));
};

Expand Down

0 comments on commit 6fed8b2

Please sign in to comment.