diff --git a/ts/interfaces/cert.ts b/ts/interfaces/cert.ts index bc35e5a..e271b75 100644 --- a/ts/interfaces/cert.ts +++ b/ts/interfaces/cert.ts @@ -1,6 +1,7 @@ export type TCertStatus = 'existing' | 'nonexisting' | 'pending' | 'failed'; export interface ICert { + id: string; domainName: string; created: number; privateKey: string; diff --git a/ts/smartacme.classes.cert.ts b/ts/smartacme.classes.cert.ts index 1d70b6c..ed10c43 100644 --- a/ts/smartacme.classes.cert.ts +++ b/ts/smartacme.classes.cert.ts @@ -12,7 +12,7 @@ import { ICert } from './interfaces'; }) export class Cert extends plugins.smartdata.SmartDataDbDoc implements interfaces.ICert { @unI() - public index: string; + public id: string; @svDb() public domainName: string; diff --git a/ts/smartacme.classes.smartacme.ts b/ts/smartacme.classes.smartacme.ts index 792a143..3c2072d 100644 --- a/ts/smartacme.classes.smartacme.ts +++ b/ts/smartacme.classes.smartacme.ts @@ -194,6 +194,7 @@ export class SmartAcme { console.log(`Certificate:\n${cert.toString()}`); await this.certmanager.storeCertificate({ + id: plugins.smartunique.shortId(), domainName: certDomain, privateKey: key.toString(), publicKey: cert.toString(),