1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 14:53:33 +00:00

[EC-584] Fixed OrganizationExportResponse to correctly parse data and use CollectionResponse and CipherResponse constructors

This commit is contained in:
Rui Tome
2022-09-28 11:46:01 +01:00
parent c243f3594e
commit c8fffa3bad

View File

@@ -9,7 +9,13 @@ export class OrganizationExportResponse extends BaseResponse {
constructor(response: any) {
super(response);
this.collections = this.getResponseProperty("Collections");
this.ciphers = this.getResponseProperty("Ciphers");
const collections = this.getResponseProperty("Collections");
if (collections != null) {
this.collections = new ListResponse(collections, CollectionResponse);
}
const ciphers = this.getResponseProperty("Ciphers");
if (ciphers != null) {
this.ciphers = new ListResponse(ciphers, CipherResponse);
}
}
}