From a24d0bad620b0693bb12ddd7cc757e923668b922 Mon Sep 17 00:00:00 2001 From: gsd Date: Tue, 16 Jan 2024 22:59:14 +0300 Subject: [PATCH] web socket servers v2.1 --- src/api/GlobalApi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/GlobalApi.js b/src/api/GlobalApi.js index 401d56a..db5a93c 100644 --- a/src/api/GlobalApi.js +++ b/src/api/GlobalApi.js @@ -72,7 +72,7 @@ export default class GlobalApi { getHumanServerName(server) { for (const srv in this.stats.servers_map) { - if (srv['key'] === server) return srv['name']; + if (this.stats.servers_map[srv]['key'] === server) return this.stats.servers_map[srv]['name']; } return "неизвестный"; } @@ -80,7 +80,7 @@ export default class GlobalApi { getServers4Selector() { let r = []; for (const srv in this.stats.servers_map) { - r.push({"srv": srv['key'], "name": srv['name']}) + r.push({"srv": this.stats.servers_map[srv]['key'], "name": this.stats.servers_map[srv]['name']}) } return r; }