From fa13cab220de8c88c1ebdba0e00353b660a61f9a Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Wed, 11 Jan 2023 17:12:56 +0100 Subject: [PATCH] Policy-Api: Remove dependency on OrgService (#4431) --- apps/browser/src/background/main.background.ts | 3 +-- libs/angular/src/services/jslib-services.module.ts | 7 +------ libs/common/src/services/policy/policy-api.service.ts | 4 +--- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts index aea7f9600d9..2fc72ede72f 100644 --- a/apps/browser/src/background/main.background.ts +++ b/apps/browser/src/background/main.background.ts @@ -328,8 +328,7 @@ export default class MainBackground { this.policyApiService = new PolicyApiService( this.policyService, this.apiService, - this.stateService, - this.organizationService + this.stateService ); this.keyConnectorService = new KeyConnectorService( this.stateService, diff --git a/libs/angular/src/services/jslib-services.module.ts b/libs/angular/src/services/jslib-services.module.ts index 245a1804604..d1d01c3bc9b 100644 --- a/libs/angular/src/services/jslib-services.module.ts +++ b/libs/angular/src/services/jslib-services.module.ts @@ -494,12 +494,7 @@ import { AbstractThemingService } from "./theming/theming.service.abstraction"; { provide: PolicyApiServiceAbstraction, useClass: PolicyApiService, - deps: [ - PolicyServiceAbstraction, - ApiServiceAbstraction, - StateServiceAbstraction, - OrganizationServiceAbstraction, - ], + deps: [PolicyServiceAbstraction, ApiServiceAbstraction, StateServiceAbstraction], }, { provide: SendServiceAbstraction, diff --git a/libs/common/src/services/policy/policy-api.service.ts b/libs/common/src/services/policy/policy-api.service.ts index f74042a36f8..98848692dda 100644 --- a/libs/common/src/services/policy/policy-api.service.ts +++ b/libs/common/src/services/policy/policy-api.service.ts @@ -1,7 +1,6 @@ import { firstValueFrom } from "rxjs"; import { ApiService } from "../../abstractions/api.service"; -import { OrganizationService } from "../../abstractions/organization/organization.service.abstraction"; import { PolicyApiServiceAbstraction } from "../../abstractions/policy/policy-api.service.abstraction"; import { InternalPolicyService } from "../../abstractions/policy/policy.service.abstraction"; import { StateService } from "../../abstractions/state.service"; @@ -16,8 +15,7 @@ export class PolicyApiService implements PolicyApiServiceAbstraction { constructor( private policyService: InternalPolicyService, private apiService: ApiService, - private stateService: StateService, - private organizationService: OrganizationService + private stateService: StateService ) {} async getPolicy(organizationId: string, type: PolicyType): Promise {