From e6195ade3ec54b138825b8d6738f86eb8afdd720 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 27 May 2025 00:22:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=201panel=20API=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=94=AF=E6=8C=81v1/v2=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/upload-to-tencent/index.ts | 43 +------------------ 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/packages/ui/certd-server/src/plugins/plugin-tencent/plugin/upload-to-tencent/index.ts b/packages/ui/certd-server/src/plugins/plugin-tencent/plugin/upload-to-tencent/index.ts index 2f364c97..2b07abb7 100644 --- a/packages/ui/certd-server/src/plugins/plugin-tencent/plugin/upload-to-tencent/index.ts +++ b/packages/ui/certd-server/src/plugins/plugin-tencent/plugin/upload-to-tencent/index.ts @@ -1,5 +1,4 @@ import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput, TaskOutput } from "@certd/pipeline"; -import dayjs from "dayjs"; import { CertApplyPluginNames, CertReader } from "@certd/plugin-cert"; import { TencentAccess, TencentSslClient } from "@certd/plugin-lib"; @@ -65,51 +64,11 @@ export class UploadCertToTencent extends AbstractTaskPlugin { cert: this.cert, }); - this.logger.info('证书上传成功:tencentCertId=', tencentCertId); - - this.tencentCertId = ret.CertificateId; + this.tencentCertId = tencentCertId; } - appendTimeSuffix(name: string) { - if (name == null) { - name = 'certd'; - } - return name + '-' + dayjs().format('YYYYMMDD-HHmmss'); - } - getClient(accessProvider: any) { - const SslClient = this.Client; - const clientConfig = { - credential: { - secretId: accessProvider.secretId, - secretKey: accessProvider.secretKey, - }, - region: '', - profile: { - httpProfile: { - endpoint: 'ssl.tencentcloudapi.com', - }, - }, - }; - - return new SslClient(clientConfig); - } - - // async rollback({ input }) { - // const { accessId } = input; - // const accessProvider = await this.getAccess(accessId); - // const client = this.getClient(accessProvider); - // - // const { tencentCertId } = context; - // const params = { - // CertificateId: tencentCertId, - // }; - // const ret = await client.DeleteCertificate(params); - // this.checkRet(ret); - // this.logger.info("证书删除成功:DeleteResult=", ret.DeleteResult); - // delete context.tencentCertId; - // } checkRet(ret: any) { if (!ret || ret.Error) { throw new Error('执行失败:' + ret.Error.Code + ',' + ret.Error.Message);