Policy-Api: Remove dependency on OrgService (#4431)

This commit is contained in:
Daniel James Smith 2023-01-11 17:12:56 +01:00 committed by GitHub
parent 794f1193db
commit fa13cab220
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 11 deletions

View File

@ -328,8 +328,7 @@ export default class MainBackground {
this.policyApiService = new PolicyApiService( this.policyApiService = new PolicyApiService(
this.policyService, this.policyService,
this.apiService, this.apiService,
this.stateService, this.stateService
this.organizationService
); );
this.keyConnectorService = new KeyConnectorService( this.keyConnectorService = new KeyConnectorService(
this.stateService, this.stateService,

View File

@ -494,12 +494,7 @@ import { AbstractThemingService } from "./theming/theming.service.abstraction";
{ {
provide: PolicyApiServiceAbstraction, provide: PolicyApiServiceAbstraction,
useClass: PolicyApiService, useClass: PolicyApiService,
deps: [ deps: [PolicyServiceAbstraction, ApiServiceAbstraction, StateServiceAbstraction],
PolicyServiceAbstraction,
ApiServiceAbstraction,
StateServiceAbstraction,
OrganizationServiceAbstraction,
],
}, },
{ {
provide: SendServiceAbstraction, provide: SendServiceAbstraction,

View File

@ -1,7 +1,6 @@
import { firstValueFrom } from "rxjs"; import { firstValueFrom } from "rxjs";
import { ApiService } from "../../abstractions/api.service"; import { ApiService } from "../../abstractions/api.service";
import { OrganizationService } from "../../abstractions/organization/organization.service.abstraction";
import { PolicyApiServiceAbstraction } from "../../abstractions/policy/policy-api.service.abstraction"; import { PolicyApiServiceAbstraction } from "../../abstractions/policy/policy-api.service.abstraction";
import { InternalPolicyService } from "../../abstractions/policy/policy.service.abstraction"; import { InternalPolicyService } from "../../abstractions/policy/policy.service.abstraction";
import { StateService } from "../../abstractions/state.service"; import { StateService } from "../../abstractions/state.service";
@ -16,8 +15,7 @@ export class PolicyApiService implements PolicyApiServiceAbstraction {
constructor( constructor(
private policyService: InternalPolicyService, private policyService: InternalPolicyService,
private apiService: ApiService, private apiService: ApiService,
private stateService: StateService, private stateService: StateService
private organizationService: OrganizationService
) {} ) {}
async getPolicy(organizationId: string, type: PolicyType): Promise<PolicyResponse> { async getPolicy(organizationId: string, type: PolicyType): Promise<PolicyResponse> {