diff --git a/src/abstractions/audit.service.ts b/src/abstractions/audit.service.ts index e324d08c4b..b8c40bc29f 100644 --- a/src/abstractions/audit.service.ts +++ b/src/abstractions/audit.service.ts @@ -2,5 +2,5 @@ import { BreachAccountResponse } from '../models/response/breachAccountResponse' export abstract class AuditService { passwordLeaked: (password: string) => Promise; - breachedAccounts: (email: string) => Promise; + breachedAccounts: (username: string) => Promise; } diff --git a/src/services/audit.service.ts b/src/services/audit.service.ts index 13226074ca..2c4e6c1639 100644 --- a/src/services/audit.service.ts +++ b/src/services/audit.service.ts @@ -26,8 +26,8 @@ export class AuditService implements AuditServiceAbstraction { return match != null ? parseInt(match.split(':')[1], 10) : 0; } - async breachedAccounts(email: string): Promise { - const response = await fetch(HibpBreachApi + email); + async breachedAccounts(username: string): Promise { + const response = await fetch(HibpBreachApi + username); if (response.status === 404) { return []; } else if (response.status !== 200) {