From 2b5d3250a4bfd2e55256ecc3fa729b5aecdad456 Mon Sep 17 00:00:00 2001 From: abearxiong Date: Sat, 7 Mar 2026 19:48:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0handleRequest?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E7=A1=AE=E4=BF=9DnewId=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E4=B8=8E=E7=94=A8=E6=88=B7=E5=85=B3=E8=81=94=E4=BB=A5?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/v1-ws-proxy/proxy.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/v1-ws-proxy/proxy.ts b/src/modules/v1-ws-proxy/proxy.ts index 755158c..fdba8e0 100644 --- a/src/modules/v1-ws-proxy/proxy.ts +++ b/src/modules/v1-ws-proxy/proxy.ts @@ -139,13 +139,14 @@ const handleRequest = async (req: IncomingMessage, res: ServerResponse, opts?: { res.end(JSON.stringify({ code: 400, message: 'newId 参数缺失' })); return; } - const wsMessage = wsProxyManager.get(newId!)!; + const realNewId = user + '--' + newId; + const wsMessage = wsProxyManager.get(realNewId!)!; if (wsMessage) { res.writeHead(400, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ code: 400, message: 'newId 已存在' })); return; } - wsProxyManager.changeId(appId, newId); + wsProxyManager.changeId(appId, realNewId); res.writeHead(200, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ code: 200, message: '应用重命名成功' })); return;