1
0
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:
Kyle Spearrin
2018-07-27 16:44:20 -04:00
parent 9df96a3288
commit dab9954887
16 changed files with 243 additions and 18 deletions

View File

@@ -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) => {

View File

@@ -0,0 +1,9 @@
export class PasswordHistoryResponse {
password: string;
lastUsedDate: Date;
constructor(response: any) {
this.password = response.Password;
this.lastUsedDate = response.LastUsedDate;
}
}