diff --git a/ts/smartacme.classes.cert.ts b/ts/smartacme.classes.cert.ts index 6dd13be..e0f7911 100644 --- a/ts/smartacme.classes.cert.ts +++ b/ts/smartacme.classes.cert.ts @@ -31,10 +31,8 @@ export class Cert extends plugins.smartdata.SmartDataDbDoc implements inte constructor(optionsArg: ICert) { super(); - this.created = optionsArg.created; - this.domainName = optionsArg.domainName; - this.privateKey = optionsArg.privateKey; - this.publicKey = optionsArg.publicKey; - this.csr = optionsArg.csr; + Object.keys(optionsArg).forEach(key => { + this[key] = optionsArg[key]; + }); } }