fix: Adjust key parsing logic in EasySwitchManager to correctly split serverId and community by the first colon, ensuring accurate data handling for gateway assignments.
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 2m5s

This commit is contained in:
2025-12-07 13:34:29 +07:00
parent f1dfb13d8e
commit a54d5c9009
+5 -1
View File
@@ -226,7 +226,11 @@ function EasySwitchManager() {
const changesByServer = new Map();
changedEntries.forEach(([key, gateway]) => {
const [serverId, community] = key.split(':');
// Разбиваем ключ по ПЕРВОМУ двоеточию, т.к. community содержит двоеточие (65001:120)
const firstColonIndex = key.indexOf(':');
const serverId = key.substring(0, firstColonIndex);
const community = key.substring(firstColonIndex + 1);
if (!changesByServer.has(serverId)) {
changesByServer.set(serverId, new Map());
}