mirror of
https://github.com/certd/certd.git
synced 2026-05-16 05:07:32 +08:00
chore: 阿里云上传证书返回值优化为带region的
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user