diff --git a/src/server/components/charts-engine/controllers/run.ts b/src/server/components/charts-engine/controllers/run.ts index 67a2bf8fc9..b0b66d006a 100644 --- a/src/server/components/charts-engine/controllers/run.ts +++ b/src/server/components/charts-engine/controllers/run.ts @@ -7,7 +7,6 @@ import get from 'lodash/get'; import type {ChartsEngine} from '..'; import {Feature, isEnabledServerFeature} from '../../../../shared'; import {DeveloperModeCheckStatus} from '../../../../shared/types'; -import {registry} from '../../../registry'; import type {ResolvedConfig} from '../components/storage/types'; import {getDuration} from '../components/utils'; @@ -24,7 +23,6 @@ export const runController = ( ) => { return async function chartsRunController(req: Request, res: Response) { const {ctx} = req; - const app = registry.getApp(); // We need it because of timeout error after 120 seconds // https://forum.nginx.org/read.php?2,214230,214239#msg-214239 @@ -131,12 +129,12 @@ export const runController = ( } if ( - isEnabledServerFeature(app.nodekit.ctx, Feature.ShouldCheckEditorAccess) && + isEnabledServerFeature(ctx, Feature.ShouldCheckEditorAccess) && runnerFound.name === 'editor' ) { - const {checkRequestForDeveloperModeAccess} = req.ctx.get('gateway'); + const {checkRequestForDeveloperModeAccess} = ctx.get('gateway'); const checkResult = await checkRequestForDeveloperModeAccess({ - ctx: req.ctx, + ctx, }); if (checkResult === DeveloperModeCheckStatus.Forbidden) {