mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
send password history to server
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { AttachmentResponse } from './attachmentResponse';
|
||||
import { PasswordHistoryResponse } from './passwordHistoryResponse';
|
||||
|
||||
import { CardApi } from '../api/cardApi';
|
||||
import { FieldApi } from '../api/fieldApi';
|
||||
@@ -23,6 +24,7 @@ export class CipherResponse {
|
||||
organizationUseTotp: boolean;
|
||||
revisionDate: Date;
|
||||
attachments: AttachmentResponse[];
|
||||
passwordHistory: PasswordHistoryResponse[];
|
||||
collectionIds: string[];
|
||||
|
||||
constructor(response: any) {
|
||||
@@ -67,6 +69,13 @@ export class CipherResponse {
|
||||
});
|
||||
}
|
||||
|
||||
if (response.PasswordHistory != null) {
|
||||
this.passwordHistory = [];
|
||||
response.PasswordHistory.forEach((ph: any) => {
|
||||
this.passwordHistory.push(new PasswordHistoryResponse(ph));
|
||||
});
|
||||
}
|
||||
|
||||
if (response.CollectionIds) {
|
||||
this.collectionIds = [];
|
||||
response.CollectionIds.forEach((id: string) => {
|
||||
|
||||
9
src/models/response/passwordHistoryResponse.ts
Normal file
9
src/models/response/passwordHistoryResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export class PasswordHistoryResponse {
|
||||
password: string;
|
||||
lastUsedDate: Date;
|
||||
|
||||
constructor(response: any) {
|
||||
this.password = response.Password;
|
||||
this.lastUsedDate = response.LastUsedDate;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user