mirror of
https://github.com/bitwarden/browser
synced 2026-01-07 19:13:39 +00:00
sync folders and ciphers. fix dates
This commit is contained in:
@@ -54,7 +54,7 @@ export class Cipher extends Domain {
|
||||
this.favorite = obj.favorite;
|
||||
this.organizationUseTotp = obj.organizationUseTotp;
|
||||
this.edit = obj.edit;
|
||||
this.revisionDate = obj.revisionDate;
|
||||
this.revisionDate = obj.revisionDate != null ? new Date(obj.revisionDate) : null;
|
||||
this.collectionIds = obj.collectionIds;
|
||||
this.localData = localData;
|
||||
|
||||
@@ -178,7 +178,7 @@ export class Cipher extends Domain {
|
||||
c.edit = this.edit;
|
||||
c.organizationUseTotp = this.organizationUseTotp;
|
||||
c.favorite = this.favorite;
|
||||
c.revisionDate = this.revisionDate;
|
||||
c.revisionDate = this.revisionDate.toISOString();
|
||||
c.type = this.type;
|
||||
c.collectionIds = this.collectionIds;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import Domain from './domain';
|
||||
export class Folder extends Domain {
|
||||
id: string;
|
||||
name: CipherString;
|
||||
revisionDate: Date;
|
||||
|
||||
constructor(obj?: FolderData, alreadyEncrypted: boolean = false) {
|
||||
super();
|
||||
@@ -19,6 +20,8 @@ export class Folder extends Domain {
|
||||
id: null,
|
||||
name: null,
|
||||
}, alreadyEncrypted, ['id']);
|
||||
|
||||
this.revisionDate = obj.revisionDate != null ? new Date(obj.revisionDate) : null;
|
||||
}
|
||||
|
||||
decrypt(): Promise<FolderView> {
|
||||
|
||||
@@ -17,8 +17,8 @@ export class Password extends Domain {
|
||||
|
||||
this.buildDomainModel(this, obj, {
|
||||
password: null,
|
||||
lastUsedDate: null,
|
||||
}, alreadyEncrypted, ['lastUsedDate']);
|
||||
}, alreadyEncrypted);
|
||||
this.lastUsedDate = new Date(obj.lastUsedDate);
|
||||
}
|
||||
|
||||
async decrypt(orgId: string): Promise<PasswordHistoryView> {
|
||||
@@ -30,7 +30,7 @@ export class Password extends Domain {
|
||||
|
||||
toPasswordHistoryData(): PasswordHistoryData {
|
||||
const ph = new PasswordHistoryData();
|
||||
ph.lastUsedDate = this.lastUsedDate;
|
||||
ph.lastUsedDate = this.lastUsedDate.toISOString();
|
||||
this.buildDataModel(this, ph, {
|
||||
password: null,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user