mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
[PM-25417] DIRT API Service Refactor (ADR-0005) (#16353)
* encode username for uri and add spec * verify response from getHibpBreach method * test/validate for BreachAccountResponse type and length instead of mock response * - extract dirt api method out of global api service - create new directory structure - change imports accordingly - extract breach account response - put extracted code into new dirt dir * codeowners and dep injection for new hibp service
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
import { BaseResponse } from "./base.response";
|
||||
|
||||
export class BreachAccountResponse extends BaseResponse {
|
||||
addedDate: string;
|
||||
breachDate: string;
|
||||
dataClasses: string[];
|
||||
description: string;
|
||||
domain: string;
|
||||
isActive: boolean;
|
||||
isVerified: boolean;
|
||||
logoPath: string;
|
||||
modifiedDate: string;
|
||||
name: string;
|
||||
pwnCount: number;
|
||||
title: string;
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
this.addedDate = this.getResponseProperty("AddedDate");
|
||||
this.breachDate = this.getResponseProperty("BreachDate");
|
||||
this.dataClasses = this.getResponseProperty("DataClasses");
|
||||
this.description = this.getResponseProperty("Description");
|
||||
this.domain = this.getResponseProperty("Domain");
|
||||
this.isActive = this.getResponseProperty("IsActive");
|
||||
this.isVerified = this.getResponseProperty("IsVerified");
|
||||
this.logoPath = this.getResponseProperty("LogoPath");
|
||||
this.modifiedDate = this.getResponseProperty("ModifiedDate");
|
||||
this.name = this.getResponseProperty("Name");
|
||||
this.pwnCount = this.getResponseProperty("PwnCount");
|
||||
this.title = this.getResponseProperty("Title");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user