diff --git a/src/lib/features/playground/playground-service.ts b/src/lib/features/playground/playground-service.ts index dd3bc2b17fe6..759a841ae75c 100644 --- a/src/lib/features/playground/playground-service.ts +++ b/src/lib/features/playground/playground-service.ts @@ -101,12 +101,18 @@ export class PlaygroundService { projects: typeof ALL | string[], environments: string[], context: SdkContextSchema, - limit: number, userId: number, ): Promise<{ result: AdvancedPlaygroundFeatureEvaluationResult[]; invalidContextProperties: string[]; }> { + // used for runtime control, do not remove + const { payload } = this.flagResolver.getVariant('advancedPlayground'); + const limit = + payload?.value && Number.isInteger(Number.parseInt(payload?.value)) + ? Number.parseInt(payload?.value) + : 15000; + const segments = await this.segmentReadModel.getActive(); let filteredProjects: typeof projects = projects; diff --git a/src/lib/features/playground/playground.ts b/src/lib/features/playground/playground.ts index 178929808ac2..5c8f4ba2fdd8 100644 --- a/src/lib/features/playground/playground.ts +++ b/src/lib/features/playground/playground.ts @@ -118,19 +118,12 @@ export default class PlaygroundController extends Controller { res: Response, ): Promise { const { user } = req; - // used for runtime control, do not remove - const { payload } = this.flagResolver.getVariant('advancedPlayground'); - const limit = - payload?.value && Number.isInteger(Number.parseInt(payload?.value)) - ? Number.parseInt(payload?.value) - : 15000; const { result, invalidContextProperties } = await this.playgroundService.evaluateAdvancedQuery( req.body.projects || '*', req.body.environments, req.body.context, - limit, extractUserIdFromUser(user), );