mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 17:23:37 +00:00
[SM-288] Rename requests and responses to follow naming convention (#3806)
This commit is contained in:
20
libs/common/src/models/response/domains.response.ts
Normal file
20
libs/common/src/models/response/domains.response.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { BaseResponse } from "./base.response";
|
||||
import { GlobalDomainResponse } from "./global-domain.response";
|
||||
|
||||
export class DomainsResponse extends BaseResponse {
|
||||
equivalentDomains: string[][];
|
||||
globalEquivalentDomains: GlobalDomainResponse[] = [];
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
this.equivalentDomains = this.getResponseProperty("EquivalentDomains");
|
||||
const globalEquivalentDomains = this.getResponseProperty("GlobalEquivalentDomains");
|
||||
if (globalEquivalentDomains != null) {
|
||||
this.globalEquivalentDomains = globalEquivalentDomains.map(
|
||||
(d: any) => new GlobalDomainResponse(d)
|
||||
);
|
||||
} else {
|
||||
this.globalEquivalentDomains = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user