1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-09 20:13:42 +00:00
Files
browser/src/models/domain/folder.ts
2018-01-20 14:12:18 -05:00

32 lines
668 B
TypeScript

import { FolderData } from '../data/folderData';
import { CipherString } from './cipherString';
import Domain from './domain';
export class Folder extends Domain {
id: string;
name: CipherString;
constructor(obj?: FolderData, alreadyEncrypted: boolean = false) {
super();
if (obj == null) {
return;
}
this.buildDomainModel(this, obj, {
id: null,
name: null,
}, alreadyEncrypted, ['id']);
}
decrypt(): Promise<any> {
const model = {
id: this.id,
};
return this.decryptObj(model, {
name: null,
}, null);
}
}