From 0b341ad6ddbf4636c124c46b20aae52024eb691a Mon Sep 17 00:00:00 2001 From: Patrick Balsiger Date: Sat, 13 Sep 2025 13:46:30 +0200 Subject: [PATCH] fix: capabilities endpoint --- index.js | 2 +- public/scripts/api-client.js | 2 +- src/client/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 01a557b..984dfb0 100644 --- a/index.js +++ b/index.js @@ -466,7 +466,7 @@ app.get('/api/node/status', async (req, res) => { }); // Proxy endpoint to get node capabilities (optionally for a specific node via ?ip=) -app.get('/api/capabilities', async (req, res) => { +app.get('/api/node/capabilities', async (req, res) => { try { const { ip } = req.query; diff --git a/public/scripts/api-client.js b/public/scripts/api-client.js index 17e6204..4f605d5 100644 --- a/public/scripts/api-client.js +++ b/public/scripts/api-client.js @@ -81,7 +81,7 @@ class ApiClient { } async getCapabilities(ip) { - return this.request('/api/capabilities', { method: 'GET', query: ip ? { ip } : undefined }); + return this.request('/api/node/capabilities', { method: 'GET', query: ip ? { ip } : undefined }); } async callCapability({ ip, method, uri, params }) { diff --git a/src/client/index.js b/src/client/index.js index 95f1c42..cb3584b 100644 --- a/src/client/index.js +++ b/src/client/index.js @@ -89,7 +89,7 @@ class SporeApiClient { * @returns {Promise} Capabilities response */ async getCapabilities() { - return this.request('GET', '/api/capabilities'); + return this.request('GET', '/api/node/capabilities'); } /**