1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00: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
2 changed files with 6 additions and 3 deletions

View File

@@ -12,8 +12,10 @@ export class AttachmentUploadDataResponse extends BaseResponse {
super(response); super(response);
this.attachmentId = this.getResponseProperty('AttachmentId'); this.attachmentId = this.getResponseProperty('AttachmentId');
this.fileUploadType = this.getResponseProperty('FileUploadType'); this.fileUploadType = this.getResponseProperty('FileUploadType');
this.cipherResponse = this.getResponseProperty('CipherResponse'); const cipherResponse = this.getResponseProperty('CipherResponse');
this.cipherMiniResponse = this.getResponseProperty('CipherMiniResponse'); 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'); this.url = this.getResponseProperty('Url');
} }

View File

@@ -11,7 +11,8 @@ export class SendFileUploadDataResponse extends BaseResponse {
constructor(response: any) { constructor(response: any) {
super(response); super(response);
this.fileUploadType = this.getResponseProperty('FileUploadType'); 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'); this.url = this.getResponseProperty('Url');
} }
} }