mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 09:43:23 +00:00
support camel or pascal case in API responses
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
export class GlobalDomainResponse {
|
||||
import { BaseResponse } from './baseResponse';
|
||||
|
||||
export class GlobalDomainResponse extends BaseResponse {
|
||||
type: number;
|
||||
domains: string[];
|
||||
excluded: number[];
|
||||
|
||||
constructor(response: any) {
|
||||
this.type = response.Type;
|
||||
this.domains = response.Domains;
|
||||
this.excluded = response.Excluded;
|
||||
super(response);
|
||||
this.type = this.getResponseProperty('Type');
|
||||
this.domains = this.getResponseProperty('Domains');
|
||||
this.excluded = this.getResponseProperty('Excluded');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user