From dc13c3aea0300e1e78db616d8cfc9eb8ddca0aaa Mon Sep 17 00:00:00 2001 From: Shane Melton Date: Tue, 27 Jun 2023 16:34:56 -0700 Subject: [PATCH] [AC-1418] Use new model and service method --- .../secrets-manager/sm-adjust-subscription.component.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/web/src/app/billing/organizations/secrets-manager/sm-adjust-subscription.component.ts b/apps/web/src/app/billing/organizations/secrets-manager/sm-adjust-subscription.component.ts index 9645c768a6..10a533156a 100644 --- a/apps/web/src/app/billing/organizations/secrets-manager/sm-adjust-subscription.component.ts +++ b/apps/web/src/app/billing/organizations/secrets-manager/sm-adjust-subscription.component.ts @@ -3,7 +3,7 @@ import { FormBuilder, Validators } from "@angular/forms"; import { Subject, takeUntil } from "rxjs"; 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 { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @@ -140,14 +140,17 @@ export class SecretsManagerAdjustSubscriptionComponent implements OnInit, OnDest const serviceAccountAdjustment = this.formGroup.value.serviceAccountCount - this.options.serviceAccountCount; - const request = OrganizationSubscriptionUpdateRequest.forSecretsManager( + const request = new OrganizationSmSubscriptionUpdateRequest( seatAdjustment, serviceAccountAdjustment, this.formGroup.value.seatLimit, this.formGroup.value.serviceAccountLimit ); - await this.organizationApiService.updatePasswordManagerSeats(this.organizationId, request); + await this.organizationApiService.updateSecretsManagerSubscription( + this.organizationId, + request + ); await this.platformUtilsService.showToast( "success",