From bf72cb49fcadf34be28daff98ecc1537bb34969f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Mon, 15 Jun 2026 16:47:47 +0400 Subject: [PATCH] =?UTF-8?q?v0.5.127:=20clId=20=D0=BE=D0=B1=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D0=BB=D1=8F=D0=B5=D1=82=D1=81=D1=8F=20=D0=BF=D0=BE=D1=81?= =?UTF-8?q?=D0=BB=D0=B5=20switchTo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- v2/src/config/index.js | 2 +- v2/src/user/index.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 2de930c..dbd564e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ipwhitelist", - "version": "0.5.126", + "version": "0.5.127", "description": "IP WhiteList microservice for cloud provider", "main": "server.js", "scripts": { diff --git a/v2/src/config/index.js b/v2/src/config/index.js index 116c227..956c742 100644 --- a/v2/src/config/index.js +++ b/v2/src/config/index.js @@ -9,7 +9,7 @@ // ═══════════════════════════════════════════════════════════════════════════════ module.exports = { - version: '0.5.126', + version: '0.5.127', // ── IAM ────────────────────────────────────────────────────────────────── iamUrl: process.env.V2_IAM_URL || 'https://auth-api.ngcloud.ru/api/v1/auth/user', diff --git a/v2/src/user/index.js b/v2/src/user/index.js index 2699ab9..45e22bc 100644 --- a/v2/src/user/index.js +++ b/v2/src/user/index.js @@ -26,7 +26,7 @@ function createUserRouter() { router.get('/', async (req, res) => { try { const isAdmin = req.canAdmin; - const clId = req.clientId; + let clId = req.clientId; // ── Компании для dropdown ─────────────────────────────────────── let companies; @@ -57,7 +57,7 @@ function createUserRouter() { if (allowed) { const oldId = req.session.user.activeClientId; req.session.user.activeClientId = targetId; - // clId теперь новый — рендерим сразу, без редиректа + clId = targetId; // использовать новый для crud.list switchDebug = { from: oldId, to: targetId, sessionID: req.sessionID }; } } @@ -82,7 +82,7 @@ function createUserRouter() { res.render('v2/user', { entries, limit, used, companies, - activeClientId: switchDebug ? switchDebug.to : clId, + activeClientId: clId, debugClientId: clId, sessionId: req.sessionID || '', sessionActiveClientId: req.session && req.session.user ? (req.session.user.activeClientId || '') : '',