We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7957826 commit 1af8ec1Copy full SHA for 1af8ec1
src/modules/asw/index.ts
@@ -89,12 +89,14 @@ export default class Asw {
89
};
90
91
let roleName = role;
92
- const { appId, ownerUin } = await this.account.get();
+ const accountInfo = await this.account.get();
93
94
if (!roleName) {
95
- roleName = await this.createRole(name, appId);
+ // 如果上层传入 appId 直接使用上层 appId,如果没有尝试通过 accountInfo 中来获取
96
+ const appId = options.appId || accountInfo.appId;
97
+ roleName = await this.createRole(name, appId!);
98
}
- reqParams.RoleResource = `qcs::cam::uin/${ownerUin}:roleName/${roleName}`;
99
+ reqParams.RoleResource = `qcs::cam::uin/${accountInfo.ownerUin}:roleName/${roleName}`;
100
101
if (input) {
102
reqParams.Input = input;
0 commit comments