mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-04 05:07:30 +00:00
fix: correct API client initialization for test connection
- Fix apiClients object access (use bracket notation, not .get()) - Initialize apiClients as plain objects, not Maps, for consistency - This fixes the "apiClients.get is not a function" error when testing connections 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -100,7 +100,7 @@ class ConfigApi {
|
||||
const { apiClients, pbsApiClients } = await initializeApiClients(testEndpoints, testPbsConfigs);
|
||||
|
||||
// Try a simple API call to verify connection
|
||||
const testClient = apiClients.get('test-primary');
|
||||
const testClient = apiClients['test-primary'];
|
||||
if (testClient) {
|
||||
await testClient.client.get('/nodes');
|
||||
}
|
||||
|
||||
+2
-2
@@ -978,8 +978,8 @@ async function startServer() {
|
||||
} else {
|
||||
console.log("INFO: No endpoints configured. Starting in setup mode.");
|
||||
// Initialize empty clients for consistency
|
||||
apiClients = new Map();
|
||||
pbsApiClients = new Map();
|
||||
apiClients = {};
|
||||
pbsApiClients = {};
|
||||
global.pulseApiClients = { apiClients, pbsApiClients };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user