1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

[PS-1093] Move Organization Api Calls (#3243)

* Move organization api calls into seperate service

* Remove unneeded unknown

* Address PR feedback
This commit is contained in:
Justin Baur
2022-08-24 12:33:05 -04:00
committed by GitHub
parent 364d2f311e
commit 7145b13df1
39 changed files with 545 additions and 414 deletions

View File

@@ -7,6 +7,7 @@ import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.s
import { CryptoService } from "@bitwarden/common/abstractions/crypto.service";
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
import { MessagingService } from "@bitwarden/common/abstractions/messaging.service";
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/abstractions/organization/organization-api.service.abstraction";
import { PasswordGenerationService } from "@bitwarden/common/abstractions/passwordGeneration.service";
import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service";
import { PolicyApiServiceAbstraction } from "@bitwarden/common/abstractions/policy/policy-api.service.abstraction";
@@ -35,7 +36,8 @@ export class SetPasswordComponent extends BaseSetPasswordComponent implements On
route: ActivatedRoute,
private broadcasterService: BroadcasterService,
private ngZone: NgZone,
stateService: StateService
stateService: StateService,
organizationApiService: OrganizationApiServiceAbstraction
) {
super(
i18nService,
@@ -49,13 +51,14 @@ export class SetPasswordComponent extends BaseSetPasswordComponent implements On
apiService,
syncService,
route,
stateService
stateService,
organizationApiService
);
}
async ngOnInit() {
await super.ngOnInit();
this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {
this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message) => {
this.ngZone.run(() => {
switch (message.command) {
case "windowHidden":