From 5b49052c335ca2ca0b6c999e812c140459cbebd1 Mon Sep 17 00:00:00 2001 From: ssw Date: Thu, 2 Jul 2026 13:45:27 +0800 Subject: [PATCH] =?UTF-8?q?P0-9=20=E4=BA=8C=E6=AC=A1=E4=BF=AE=E5=A4=8D:=20?= =?UTF-8?q?role/assign=20userIds=20=E5=8F=98=E9=87=8F=E9=87=8D=E5=A3=B0?= =?UTF-8?q?=E6=98=8E=20(2026-07-02)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 第一次 commit 变量名冲突: 在 for 循环里用 userIds, 后面又重新声明 修复: 删除后面重复的 const userIds 声明 --- src/commands/role/assign.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/commands/role/assign.ts b/src/commands/role/assign.ts index 492ea92..b10f041 100644 --- a/src/commands/role/assign.ts +++ b/src/commands/role/assign.ts @@ -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) {