From 8f1886a5851d5db0a20be07b9774b6e7859d0ba3 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Fri, 26 Feb 2021 15:23:53 +0800 Subject: [PATCH] refactor: dir with suffix --- packages/core/certd/src/store/cert-store.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/core/certd/src/store/cert-store.js b/packages/core/certd/src/store/cert-store.js index b4ea4ee0f..d5038a6f5 100644 --- a/packages/core/certd/src/store/cert-store.js +++ b/packages/core/certd/src/store/cert-store.js @@ -1,9 +1,9 @@ import dayjs from 'dayjs' -import crypto from 'crypto' -// eslint-disable-next-line no-unused-vars -function md5 (content) { - return crypto.createHash('md5').update(content).digest('hex') -} +// import crypto from 'crypto' +// // eslint-disable-next-line no-unused-vars +// function md5 (content) { +// return crypto.createHash('md5').update(content).digest('hex') +// } export class CertStore { constructor ({ store, email, domains }) { this.store = store @@ -11,7 +11,7 @@ export class CertStore { this.domains = domains this.domain = this.getMainDomain(this.domains) this.safetyDomain = this.getSafetyDomain(this.domain) - this.domainDir = this.safetyDomain + '-' + md5(this.getDomainStr(this.domains)) + this.domainDir = this.safetyDomain + '-' + this.domains.length // this.domainDir = this.safetyDomain this.certsRootPath = this.store.buildKey(this.email, 'certs')