mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
fix: 修复阿里云 esa 证书获取站点列表错误的问题
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
"pub": "npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"@alicloud/credentials": "^2.4.3",
|
||||
"@alicloud/openapi-client": "^0.4.14",
|
||||
"@alicloud/pop-core": "^1.7.10",
|
||||
"@alicloud/tea-util": "^1.4.10",
|
||||
|
||||
@@ -13,7 +13,6 @@ export type AliyunClientV2Req = {
|
||||
pathname?: `/`;
|
||||
|
||||
data?: any;
|
||||
query?: any;
|
||||
};
|
||||
export class AliyunClientV2 {
|
||||
access: AliyunAccess;
|
||||
@@ -32,15 +31,15 @@ export class AliyunClientV2 {
|
||||
return this.client;
|
||||
}
|
||||
const $OpenApi = await import("@alicloud/openapi-client");
|
||||
const Credential = await import("@alicloud/credentials");
|
||||
//@ts-ignore
|
||||
const credential = new Credential.default.default({
|
||||
// const Credential = await import("@alicloud/credentials");
|
||||
// //@ts-ignore
|
||||
// const credential = new Credential.default.default({
|
||||
//
|
||||
// type: "access_key",
|
||||
// });
|
||||
const config = new $OpenApi.Config({
|
||||
accessKeyId: this.access.accessKeyId,
|
||||
accessKeySecret: this.access.accessKeySecret,
|
||||
type: "access_key",
|
||||
});
|
||||
const config = new $OpenApi.Config({
|
||||
credential,
|
||||
});
|
||||
// Endpoint 请参考 https://api.aliyun.com/product/FC
|
||||
// config.endpoint = `esa.${this.regionId}.aliyuncs.com`;
|
||||
@@ -76,10 +75,7 @@ export class AliyunClientV2 {
|
||||
});
|
||||
|
||||
const runtime = new $Util.RuntimeOptions({});
|
||||
const request = new $OpenApi.OpenApiRequest({
|
||||
body: req.data,
|
||||
query: req.query,
|
||||
});
|
||||
const request = new $OpenApi.OpenApiRequest(req.data);
|
||||
// 复制代码运行请自行打印 API 的返回值
|
||||
// 返回值实际为 Map 类型,可从 Map 中获得三类数据:响应体 body、响应头 headers、HTTP 返回的状态码 statusCode。
|
||||
const res = await client.callApi(params, request, runtime);
|
||||
|
||||
Reference in New Issue
Block a user