Skip to content

Commit

Permalink
feat: transactional project service support (#7799)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Aug 7, 2024
1 parent 4daede8 commit 8caa1e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -398,6 +401,7 @@ export const createServices = (
featureTypeService,
healthService,
projectService,
transactionalProjectService,
strategyService,
tagTypeService,
transactionalTagTypeService,
Expand Down
1 change: 1 addition & 0 deletions src/lib/types/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export interface IUnleashServices {
healthService: HealthService;
projectHealthService: ProjectHealthService;
projectService: ProjectService;
transactionalProjectService: WithTransactional<ProjectService>;
playgroundService: PlaygroundService;
frontendApiService: FrontendApiService;
publicSignupTokenService: PublicSignupTokenService;
Expand Down

0 comments on commit 8caa1e2

Please sign in to comment.