From 360e731c956f51b25debdbb242c687997e5de6fe Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Thu, 8 May 2025 16:28:29 +0200 Subject: [PATCH] Move billing code to new encrypt service interface (#14543) --- .../app/billing/organizations/organization-plans.component.ts | 2 +- .../organization-self-hosting-license-uploader.component.ts | 2 +- .../common/src/billing/services/organization-billing.service.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/app/billing/organizations/organization-plans.component.ts b/apps/web/src/app/billing/organizations/organization-plans.component.ts index e373b0d4dee..aad3b8df763 100644 --- a/apps/web/src/app/billing/organizations/organization-plans.component.ts +++ b/apps/web/src/app/billing/organizations/organization-plans.component.ts @@ -626,7 +626,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { if (this.createOrganization) { const orgKey = await this.keyService.makeOrgKey(); const key = orgKey[0].encryptedString; - const collection = await this.encryptService.encrypt( + const collection = await this.encryptService.encryptString( this.i18nService.t("defaultCollection"), orgKey[1], ); diff --git a/apps/web/src/app/billing/shared/self-hosting-license-uploader/organization-self-hosting-license-uploader.component.ts b/apps/web/src/app/billing/shared/self-hosting-license-uploader/organization-self-hosting-license-uploader.component.ts index c8d5eac2099..222aff3fec6 100644 --- a/apps/web/src/app/billing/shared/self-hosting-license-uploader/organization-self-hosting-license-uploader.component.ts +++ b/apps/web/src/app/billing/shared/self-hosting-license-uploader/organization-self-hosting-license-uploader.component.ts @@ -51,7 +51,7 @@ export class OrganizationSelfHostingLicenseUploaderComponent extends AbstractSel const orgKey = await this.keyService.makeOrgKey(); const key = orgKey[0].encryptedString; - const collection = await this.encryptService.encrypt( + const collection = await this.encryptService.encryptString( this.i18nService.t("defaultCollection"), orgKey[1], ); diff --git a/libs/common/src/billing/services/organization-billing.service.ts b/libs/common/src/billing/services/organization-billing.service.ts index 6622cdcdce3..c6bd88d8dd6 100644 --- a/libs/common/src/billing/services/organization-billing.service.ts +++ b/libs/common/src/billing/services/organization-billing.service.ts @@ -120,7 +120,7 @@ export class OrganizationBillingService implements OrganizationBillingServiceAbs private async makeOrganizationKeys(): Promise { const [encryptedKey, key] = await this.keyService.makeOrgKey(); const [publicKey, encryptedPrivateKey] = await this.keyService.makeKeyPair(key); - const encryptedCollectionName = await this.encryptService.encrypt( + const encryptedCollectionName = await this.encryptService.encryptString( this.i18nService.t("defaultCollection"), key, );