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:
@@ -8,6 +8,8 @@ import { IdentityApi } from '../api/identityApi';
|
||||
import { LoginApi } from '../api/loginApi';
|
||||
import { SecureNoteApi } from '../api/secureNoteApi';
|
||||
|
||||
import { PasswordHistoryRequest } from './passwordHistoryRequest';
|
||||
|
||||
export class CipherRequest {
|
||||
type: CipherType;
|
||||
folderId: string;
|
||||
@@ -20,6 +22,7 @@ export class CipherRequest {
|
||||
card: CardApi;
|
||||
identity: IdentityApi;
|
||||
fields: FieldApi[];
|
||||
passwordHistory: PasswordHistoryRequest[];
|
||||
attachments: { [id: string]: string; };
|
||||
|
||||
constructor(cipher: Cipher) {
|
||||
@@ -102,6 +105,16 @@ export class CipherRequest {
|
||||
});
|
||||
}
|
||||
|
||||
if (cipher.passwordHistory) {
|
||||
this.passwordHistory = [];
|
||||
cipher.passwordHistory.forEach((ph) => {
|
||||
this.passwordHistory.push({
|
||||
lastUsedDate: ph.lastUsedDate,
|
||||
password: ph.password ? ph.password.encryptedString : null,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (cipher.attachments) {
|
||||
this.attachments = {};
|
||||
cipher.attachments.forEach((attachment) => {
|
||||
|
||||
Reference in New Issue
Block a user