From ba21adf3ae27c1995f1f11bc1d7a2ba25a7efde0 Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Thu, 14 Jul 2022 13:50:41 +0200 Subject: [PATCH] fix: admin global features endpoint The Admin global features endpoint was using the client features store to join in environments, strategies and segments, when all we actually need is the feature metadata. This PR swaps which method we use for getting the data. Co-authored-by: Fredrik Strand Oseberg Co-authored-by: Simon Hornby --- src/lib/routes/admin-api/feature.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/routes/admin-api/feature.ts b/src/lib/routes/admin-api/feature.ts index 9a17b3645c..fcf4dcd5ca 100644 --- a/src/lib/routes/admin-api/feature.ts +++ b/src/lib/routes/admin-api/feature.ts @@ -177,9 +177,7 @@ class FeatureController extends Controller { req: Request, res: Response, ): Promise { - const query = await this.prepQuery(req.query); - const features = await this.service.getFeatureToggles(query); - + const features = await this.service.getMetadataForAllFeatures(false); this.openApiService.respondWithValidation( 200, res,