1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 04:03:29 +00:00

Fxi linting issue by executing npm run prettier

This commit is contained in:
Daniel James Smith
2025-09-04 20:58:28 +02:00
parent d566501ae2
commit fc9a4697c8

View File

@@ -138,44 +138,49 @@ export class OrganizationVaultExportService
const restrictions = await firstValueFrom(this.restrictedItemTypesService.restricted$);
promises.push(
this.vaultExportApiService.getOrganizationExport(organizationId as OrganizationId).then((exportData) => {
const exportPromises: any = [];
if (exportData != null) {
if (exportData.collections != null && exportData.collections.length > 0) {
exportData.collections.forEach((c) => {
const collection = Collection.fromCollectionData(
new CollectionData(c as CollectionDetailsResponse),
);
exportPromises.push(
firstValueFrom(this.keyService.activeUserOrgKeys$)
.then((keys) =>
collection.decrypt(keys[organizationId as OrganizationId], this.encryptService),
)
.then((decCol) => {
decCollections.push(decCol);
}),
);
});
}
if (exportData.ciphers != null && exportData.ciphers.length > 0) {
exportData.ciphers
.filter((c) => c.deletedDate === null)
.forEach(async (c) => {
const cipher = new Cipher(new CipherData(c));
this.vaultExportApiService
.getOrganizationExport(organizationId as OrganizationId)
.then((exportData) => {
const exportPromises: any = [];
if (exportData != null) {
if (exportData.collections != null && exportData.collections.length > 0) {
exportData.collections.forEach((c) => {
const collection = Collection.fromCollectionData(
new CollectionData(c as CollectionDetailsResponse),
);
exportPromises.push(
this.cipherService.decrypt(cipher, activeUserId).then((decCipher) => {
if (
!this.restrictedItemTypesService.isCipherRestricted(decCipher, restrictions)
) {
decCiphers.push(decCipher);
}
}),
firstValueFrom(this.keyService.activeUserOrgKeys$)
.then((keys) =>
collection.decrypt(
keys[organizationId as OrganizationId],
this.encryptService,
),
)
.then((decCol) => {
decCollections.push(decCol);
}),
);
});
}
if (exportData.ciphers != null && exportData.ciphers.length > 0) {
exportData.ciphers
.filter((c) => c.deletedDate === null)
.forEach(async (c) => {
const cipher = new Cipher(new CipherData(c));
exportPromises.push(
this.cipherService.decrypt(cipher, activeUserId).then((decCipher) => {
if (
!this.restrictedItemTypesService.isCipherRestricted(decCipher, restrictions)
) {
decCiphers.push(decCipher);
}
}),
);
});
}
}
}
return Promise.all(exportPromises);
}),
return Promise.all(exportPromises);
}),
);
await Promise.all(promises);
@@ -192,7 +197,9 @@ export class OrganizationVaultExportService
const restrictions = await firstValueFrom(this.restrictedItemTypesService.restricted$);
const exportData = await this.vaultExportApiService.getOrganizationExport(organizationId as OrganizationId);
const exportData = await this.vaultExportApiService.getOrganizationExport(
organizationId as OrganizationId,
);
if (exportData == null) {
return;