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'); } /**