1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-23 19:53:55 +00:00

support camel or pascal case in API responses

This commit is contained in:
Kyle Spearrin
2019-03-01 00:13:37 -05:00
parent 62e9c75357
commit 48164a31d9
43 changed files with 637 additions and 449 deletions

View File

@@ -1,9 +1,12 @@
export class UserKeyResponse {
import { BaseResponse } from './baseResponse';
export class UserKeyResponse extends BaseResponse {
userId: string;
publicKey: string;
constructor(response: any) {
this.userId = response.UserId;
this.publicKey = response.PublicKey;
super(response);
this.userId = this.getResponseProperty('UserId');
this.publicKey = this.getResponseProperty('PublicKey');
}
}