1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

Deep parse models (#321)

This commit is contained in:
Matt Gibson 2021-04-05 11:13:34 -05:00 committed by GitHub
parent bc7bd5bd3f
commit c395293e64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -12,8 +12,10 @@ export class AttachmentUploadDataResponse extends BaseResponse {
super(response);
this.attachmentId = this.getResponseProperty('AttachmentId');
this.fileUploadType = this.getResponseProperty('FileUploadType');
this.cipherResponse = this.getResponseProperty('CipherResponse');
this.cipherMiniResponse = this.getResponseProperty('CipherMiniResponse');
const cipherResponse = this.getResponseProperty('CipherResponse');
const cipherMiniResponse = this.getResponseProperty('CipherMiniResponse');
this.cipherResponse = cipherResponse == null ? null : new CipherResponse(cipherResponse);
this.cipherMiniResponse = cipherMiniResponse == null ? null : new CipherResponse(cipherMiniResponse);
this.url = this.getResponseProperty('Url');
}

View File

@ -11,7 +11,8 @@ export class SendFileUploadDataResponse extends BaseResponse {
constructor(response: any) {
super(response);
this.fileUploadType = this.getResponseProperty('FileUploadType');
this.sendResponse = this.getResponseProperty('SendResponse');
const sendResponse = this.getResponseProperty('SendResponse');
this.sendResponse = sendResponse == null ? null : new SendResponse(sendResponse);
this.url = this.getResponseProperty('Url');
}
}