P0-9 二次修复: role/assign userIds 变量重声明 (2026-07-02)
第一次 commit 变量名冲突: 在 for 循环里用 userIds, 后面又重新声明 修复: 删除后面重复的 const userIds 声明
This commit is contained in:
1 parent
9f44ad6314
commit
5b49052c33
1 file changed
-1
@@ -61,7 +61,6 @@ export function buildRoleAssignCommand(): Command {
|
||||
}
|
||||
const c = await JnpfClient.fromToken()
|
||||
await initRoleRelationWebapi(c)
|
||||
const userIds = opts.userIds.split(',').map((s) => s.trim()).filter(Boolean)
|
||||
const fn = opts.action === 'add' ? loadRoleRelation.addRoles : loadRoleRelation.removeRoles
|
||||
const r = (await fn({ roleId: opts.roleId, userIds })) as { code?: number; msg?: string }
|
||||
if (r.code !== 200) {
|
||||
|
||||
Reference in new issue
Block a user