pull/265/head
xiaojunnuo 2024-12-02 16:43:09 +08:00
parent 49e7dc56e1
commit 70210f567a
2 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,7 @@ import { QiniuAccess, QiniuClient } from '@certd/plugin-plus';
@IsTaskPlugin({
name: 'QiniuDeployCertToCDN',
title: '部署证书至七牛CDN',
title: '部署证书至七牛CDN',
icon: 'svg:icon-qiniuyun',
group: pluginGroups.qiniu.key,
desc: '自动部署域名证书至七牛云CDN',
@ -60,6 +60,7 @@ export class QiniuDeployCertToCDN extends AbstractTaskPlugin {
const qiniuClient = new QiniuClient({
http: this.ctx.http,
access,
logger: this.logger,
});
let certId = null;
@ -108,6 +109,7 @@ export class QiniuDeployCertToCDN extends AbstractTaskPlugin {
const qiniuClient = new QiniuClient({
http: this.ctx.http,
access,
logger: this.logger,
});
const url = `https://api.qiniu.com/domain?limit=1000`;
const res = await qiniuClient.doRequest(url, 'get');

View File

@ -55,6 +55,7 @@ export class QiniuCertUpload extends AbstractTaskPlugin {
const qiniuClient = new QiniuClient({
http: this.ctx.http,
access,
logger: this.logger,
});
this.qiniuCertId = await qiniuClient.uploadCert(this.cert, this.appendTimeSuffix(this.certName));
this.logger.info('上传完成,id:', this.qiniuCertId);