Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Dec 17, 2024
1 parent 6beba77 commit 43ea720
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type {
IClientSegment,
IEventStore,
IFeatureToggleDeltaQuery,
IFeatureToggleQuery,
Expand All @@ -12,8 +13,6 @@ import type {
FeatureConfigurationDeltaClient,
IClientFeatureToggleDeltaReadModel,
} from './client-feature-toggle-delta-read-model-type';
import type { Segment } from 'unleash-client/lib/strategy/strategy';
import { mapSegmentsForClient } from '../../playground/offline-unleash-client';

type DeletedFeature = {
name: string;
Expand All @@ -24,7 +23,7 @@ export type RevisionDeltaEntry = {
updated: FeatureConfigurationDeltaClient[];
revisionId: number;
removed: DeletedFeature[];
segments: Segment[];
segments: IClientSegment[];
};

export type Revision = {
Expand Down Expand Up @@ -100,7 +99,7 @@ export class ClientFeatureToggleDelta {

private delta: Revisions = {};

private segments: Segment[] = [];
private segments: IClientSegment[] = [];

private eventStore: IEventStore;

Expand Down Expand Up @@ -289,8 +288,6 @@ export class ClientFeatureToggleDelta {
}

private async updateSegments(): Promise<void> {
this.segments = mapSegmentsForClient(
await this.segmentReadModel.getAll(),
);
this.segments = await this.segmentReadModel.getActiveForClient();
}
}

0 comments on commit 43ea720

Please sign in to comment.