From 26540f1b030aa79094b56eaf1f154da32ed92904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ra=C4=8D=C3=A1k?= Date: Fri, 1 Nov 2024 14:48:18 +0100 Subject: [PATCH] Check the feature flag before baking multi-dim --- adminSiteServer/apiRouter.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/adminSiteServer/apiRouter.ts b/adminSiteServer/apiRouter.ts index 783f87d024..231a2314cd 100644 --- a/adminSiteServer/apiRouter.ts +++ b/adminSiteServer/apiRouter.ts @@ -8,7 +8,9 @@ import { BAKED_BASE_URL, ADMIN_BASE_URL, DATA_API_URL, + FEATURE_FLAGS, } from "../settings/serverSettings.js" +import { FeatureFlagFeature } from "../settings/clientSettings.js" import { expectInt, isValidSlug } from "../serverUtils/serverUtil.js" import { OldChartFieldList, @@ -1175,7 +1177,10 @@ putRouteWithRWTransaction( } const rawConfig = req.body as MultiDimDataPageConfigRaw const id = await createMultiDimConfig(trx, slug, rawConfig) - if (await isMultiDimDataPagePublished(trx, id)) { + if ( + FEATURE_FLAGS.has(FeatureFlagFeature.MultiDimDataPage) && + (await isMultiDimDataPagePublished(trx, id)) + ) { await triggerStaticBuild( res.locals.user, `Publishing multidimensional chart ${slug}`