From 79381985e3286f40a094bb65cb0cdce0809773c2 Mon Sep 17 00:00:00 2001 From: Gitar Date: Tue, 17 Sep 2024 20:09:46 +0000 Subject: [PATCH] [DJ] [Gitar] Updating TypeScript files --- src/lib/features/project/project-service.e2e.test.ts | 2 +- src/lib/features/project/project-service.ts | 5 ++--- src/lib/types/experimental.ts | 4 ---- src/server-dev.ts | 1 - 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/lib/features/project/project-service.e2e.test.ts b/src/lib/features/project/project-service.e2e.test.ts index eeebf1f5580d..10fa6b02e180 100644 --- a/src/lib/features/project/project-service.e2e.test.ts +++ b/src/lib/features/project/project-service.e2e.test.ts @@ -83,7 +83,7 @@ beforeAll(async () => { const config = createTestConfig({ getLogger, experimental: { - flags: { archiveProjects: true, useProjectReadModel: true }, + flags: { archiveProjects: true }, }, }); eventService = createEventsService(db.rawDatabase, config); diff --git a/src/lib/features/project/project-service.ts b/src/lib/features/project/project-service.ts index 35f99f31be14..1d9131badabc 100644 --- a/src/lib/features/project/project-service.ts +++ b/src/lib/features/project/project-service.ts @@ -233,9 +233,8 @@ export default class ProjectService { query?: IProjectQuery, userId?: number, ): Promise { - const getProjects = this.flagResolver.isEnabled('useProjectReadModel') - ? () => this.projectReadModel.getProjectsForAdminUi(query, userId) - : () => this.projectStore.getProjectsWithCounts(query, userId); + const getProjects = () => + this.projectStore.getProjectsWithCounts(query, userId); const projects = await getProjects(); diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 09e56e2bc3eb..95690d7c1b75 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -292,10 +292,6 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_PROJECT_LIST_IMPROVEMENTS, false, ), - useProjectReadModel: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_USE_PROJECT_READ_MODEL, - false, - ), addonUsageMetrics: parseEnvVarBoolean( process.env.UNLEASH_EXPERIMENTAL_ADDON_USAGE_METRICS, false, diff --git a/src/server-dev.ts b/src/server-dev.ts index be7e586391db..236395d6153c 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -53,7 +53,6 @@ process.nextTick(async () => { originMiddleware: true, newEventSearch: true, projectListImprovements: true, - useProjectReadModel: true, addonUsageMetrics: true, onboardingMetrics: true, onboardingUI: true,