mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-02 13:23:29 +01:00
[AC-1418] Use new model and service method
This commit is contained in:
parent
4f71542a38
commit
dc13c3aea0
@ -3,7 +3,7 @@ import { FormBuilder, Validators } from "@angular/forms";
|
|||||||
import { Subject, takeUntil } from "rxjs";
|
import { Subject, takeUntil } from "rxjs";
|
||||||
|
|
||||||
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction";
|
||||||
import { OrganizationSubscriptionUpdateRequest } from "@bitwarden/common/billing/models/request/organization-subscription-update.request";
|
import { OrganizationSmSubscriptionUpdateRequest } from "@bitwarden/common/billing/models/request/organization-sm-subscription-update.request";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
|
|
||||||
@ -140,14 +140,17 @@ export class SecretsManagerAdjustSubscriptionComponent implements OnInit, OnDest
|
|||||||
const serviceAccountAdjustment =
|
const serviceAccountAdjustment =
|
||||||
this.formGroup.value.serviceAccountCount - this.options.serviceAccountCount;
|
this.formGroup.value.serviceAccountCount - this.options.serviceAccountCount;
|
||||||
|
|
||||||
const request = OrganizationSubscriptionUpdateRequest.forSecretsManager(
|
const request = new OrganizationSmSubscriptionUpdateRequest(
|
||||||
seatAdjustment,
|
seatAdjustment,
|
||||||
serviceAccountAdjustment,
|
serviceAccountAdjustment,
|
||||||
this.formGroup.value.seatLimit,
|
this.formGroup.value.seatLimit,
|
||||||
this.formGroup.value.serviceAccountLimit
|
this.formGroup.value.serviceAccountLimit
|
||||||
);
|
);
|
||||||
|
|
||||||
await this.organizationApiService.updatePasswordManagerSeats(this.organizationId, request);
|
await this.organizationApiService.updateSecretsManagerSubscription(
|
||||||
|
this.organizationId,
|
||||||
|
request
|
||||||
|
);
|
||||||
|
|
||||||
await this.platformUtilsService.showToast(
|
await this.platformUtilsService.showToast(
|
||||||
"success",
|
"success",
|
||||||
|
Loading…
Reference in New Issue
Block a user