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
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 2m5s
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user