Skip to content

Commit

Permalink
Merge branch 'global-repository' of github.com:Unleash/unleash into g…
Browse files Browse the repository at this point in the history
…lobal-repository
  • Loading branch information
kwasniew committed Mar 7, 2024
2 parents a3c6ef7 + 18aa773 commit c3ab309
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/lib/proxy/client-feature-toggle-read-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,31 +196,6 @@ export default class ClientFeatureToggleReadModel {
);
}

private addSegmentToStrategy(
feature: PartialDeep<IFeatureToggleClient>,
row: Record<string, any>,
) {
feature.strategies
?.find((s) => s?.id === row.strategy_id)
?.constraints?.push(...row.segment_constraints);
}

private addSegmentIdsToStrategy(
feature: PartialDeep<IFeatureToggleClient>,
row: Record<string, any>,
) {
const strategy = feature.strategies?.find(
(s) => s?.id === row.strategy_id,
);
if (!strategy) {
return;
}
if (!strategy.segments) {
strategy.segments = [];
}
strategy.segments.push(row.segment_id);
}

async getClient(): Promise<Record<string, IFeatureToggleClient[]>> {
return this.getAll();
}
Expand Down

0 comments on commit c3ab309

Please sign in to comment.