mirror of
https://github.com/bitwarden/browser
synced 2026-01-03 00:53:23 +00:00
encrypted import for bitwarden json (#220)
This commit is contained in:
@@ -98,6 +98,7 @@ export class ExportService implements ExportServiceAbstraction {
|
||||
return papa.unparse(exportCiphers);
|
||||
} else {
|
||||
const jsonDoc: any = {
|
||||
encrypted: false,
|
||||
folders: [],
|
||||
items: [],
|
||||
};
|
||||
@@ -130,6 +131,7 @@ export class ExportService implements ExportServiceAbstraction {
|
||||
const ciphers = await this.cipherService.getAll();
|
||||
|
||||
const jsonDoc: any = {
|
||||
encrypted: true,
|
||||
folders: [],
|
||||
items: [],
|
||||
};
|
||||
@@ -215,6 +217,7 @@ export class ExportService implements ExportServiceAbstraction {
|
||||
return papa.unparse(exportCiphers);
|
||||
} else {
|
||||
const jsonDoc: any = {
|
||||
encrypted: false,
|
||||
collections: [],
|
||||
items: [],
|
||||
};
|
||||
@@ -264,6 +267,7 @@ export class ExportService implements ExportServiceAbstraction {
|
||||
await Promise.all(promises);
|
||||
|
||||
const jsonDoc: any = {
|
||||
encrypted: true,
|
||||
collections: [],
|
||||
items: [],
|
||||
};
|
||||
|
||||
@@ -165,12 +165,12 @@ export class ImportService implements ImportServiceAbstraction {
|
||||
}
|
||||
}
|
||||
|
||||
getImporter(format: string, organization = false): Importer {
|
||||
getImporter(format: string, organizationId: string = null): Importer {
|
||||
const importer = this.getImporterInstance(format);
|
||||
if (importer == null) {
|
||||
return null;
|
||||
}
|
||||
importer.organization = organization;
|
||||
importer.organizationId = organizationId;
|
||||
return importer;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user