mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
[EC-584] Fixed OrganizationExportResponse to correctly parse data (#3641)
* [EC-584] Fixed OrganizationExportResponse to correctly parse data and use CollectionResponse and CipherResponse constructors * [EC-584] Removed ListResponse from OrganizationExportResponse properties * Bumped web version to 2022.10.3 (#3957) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Revert "Bumped web version to 2022.10.3 (#3957)" This reverts commit5d8d547cd2. * Web version bump to 2022.11.0 for QA testing * Revert "Web version bump to 2022.11.0 for QA testing" This reverts commit484db431ed. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Joseph Flinn <joseph.s.flinn@gmail.com>
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
import { BaseResponse } from "./base.response";
|
||||
import { CipherResponse } from "./cipher.response";
|
||||
import { CollectionResponse } from "./collection.response";
|
||||
import { ListResponse } from "./list.response";
|
||||
|
||||
export class OrganizationExportResponse extends BaseResponse {
|
||||
collections: ListResponse<CollectionResponse>;
|
||||
ciphers: ListResponse<CipherResponse>;
|
||||
collections: CollectionResponse[];
|
||||
ciphers: CipherResponse[];
|
||||
|
||||
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 = collections.map((c: any) => new CollectionResponse(c));
|
||||
}
|
||||
const ciphers = this.getResponseProperty("Ciphers");
|
||||
if (ciphers != null) {
|
||||
this.ciphers = ciphers.map((c: any) => new CipherResponse(c));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user