diff --git a/src/lib/services/index.ts b/src/lib/services/index.ts index b05f97211d7a..12a8523150e6 100644 --- a/src/lib/services/index.ts +++ b/src/lib/services/index.ts @@ -300,6 +300,9 @@ export const createServices = ( const projectService = db ? createProjectService(db, config) : createFakeProjectService(config); + const transactionalProjectService = db + ? withTransactional((db: Db) => createProjectService(db, config), db) + : withFakeTransactional(createFakeProjectService(config)); const projectInsightsService = db ? createProjectInsightsService(db, config) : createFakeProjectInsightsService().projectInsightsService; @@ -398,6 +401,7 @@ export const createServices = ( featureTypeService, healthService, projectService, + transactionalProjectService, strategyService, tagTypeService, transactionalTagTypeService, diff --git a/src/lib/types/services.ts b/src/lib/types/services.ts index 1b83349f6559..99c31a146abd 100644 --- a/src/lib/types/services.ts +++ b/src/lib/types/services.ts @@ -78,6 +78,7 @@ export interface IUnleashServices { healthService: HealthService; projectHealthService: ProjectHealthService; projectService: ProjectService; + transactionalProjectService: WithTransactional; playgroundService: PlaygroundService; frontendApiService: FrontendApiService; publicSignupTokenService: PublicSignupTokenService;