chore: 阿里云上传证书返回值优化为带region的

This commit is contained in:
xiaojunnuo
2026-01-31 19:36:37 +08:00
parent 1a0d3eeb1b
commit 1089aeab9e
10 changed files with 24 additions and 20 deletions
@@ -98,7 +98,11 @@ export class AliyunSslClient {
return `${certId}-${this.getCasRegionFromEndpoint(this.opts.endpoint)}`;
}
async uploadCert(req: AliyunSslUploadCertReq) : Promise<CasCertId> {
async uploadCert(req: AliyunSslUploadCertReq) {
const {certId} = await this.uploadCertificate(req);
return certId;
}
async uploadCertificate(req: AliyunSslUploadCertReq) : Promise<CasCertId> {
const client = await this.getClient();
const params = {
Name: req.name,
@@ -127,7 +131,7 @@ export class AliyunSslClient {
// 上传证书到阿里云
this.logger.info(`开始上传证书`);
const certName = CertReader.buildCertName(cert);
const res = await this.uploadCert({
const res = await this.uploadCertificate({
name: certName,
cert: cert
});