Skip to content

Commit

Permalink
Check the feature flag before baking multi-dim
Browse files Browse the repository at this point in the history
  • Loading branch information
rakyi committed Nov 1, 2024
1 parent 5621087 commit 26540f1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion adminSiteServer/apiRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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}`
Expand Down

0 comments on commit 26540f1

Please sign in to comment.