diff --git a/frontend/proxy.conf.local-esplora.js b/frontend/proxy.conf.local-esplora.js index 8bb57e623..a7137f3bc 100644 --- a/frontend/proxy.conf.local-esplora.js +++ b/frontend/proxy.conf.local-esplora.js @@ -112,6 +112,14 @@ PROXY_CONFIG.push(...[ "^/testnet": "" }, }, + { + context: ['/api/v1/services/**'], + target: `http://localhost:9000`, + secure: false, + ws: true, + changeOrigin: true, + proxyTimeout: 30000, + }, { context: ['/api/v1/**'], target: `http://127.0.0.1:8999`, diff --git a/frontend/proxy.conf.local.js b/frontend/proxy.conf.local.js index b2fb1bb27..3a502e0ed 100644 --- a/frontend/proxy.conf.local.js +++ b/frontend/proxy.conf.local.js @@ -112,6 +112,14 @@ PROXY_CONFIG.push(...[ "^/testnet": "" }, }, + { + context: ['/api/v1/services/**'], + target: `http://localhost:9000`, + secure: false, + ws: true, + changeOrigin: true, + proxyTimeout: 30000, + }, { context: ['/api/v1/**'], target: `http://localhost:8999`, diff --git a/frontend/proxy.conf.mixed.js b/frontend/proxy.conf.mixed.js index c0c7157ff..76bb06607 100644 --- a/frontend/proxy.conf.mixed.js +++ b/frontend/proxy.conf.mixed.js @@ -95,6 +95,14 @@ if (configContent && configContent.BASE_MODULE === 'bisq') { } PROXY_CONFIG.push(...[ + { + context: ['/api/v1/services/**'], + target: `http://localhost:9000`, + secure: false, + ws: true, + changeOrigin: true, + proxyTimeout: 30000, + }, { context: ['/api/v1/**'], target: `http://localhost:8999`, diff --git a/frontend/src/app/services/api.service.ts b/frontend/src/app/services/api.service.ts index 2262e30d6..a5543cab6 100644 --- a/frontend/src/app/services/api.service.ts +++ b/frontend/src/app/services/api.service.ts @@ -9,6 +9,7 @@ import { Outspend, Transaction } from '../interfaces/electrs.interface'; import { Conversion } from './price.service'; import { MenuGroup } from '../interfaces/services.interface'; +// Todo - move to config.json const SERVICES_API_PREFIX = `/api/v1/services`; @Injectable({ @@ -348,43 +349,8 @@ export class ApiService { return of(null); } - return of([ - { - title: 'Lightning', - i18n: '', - items: [ - { - title: 'Nodes', - i18n: '', - faIcon: 'network-wired', - link: '/services/lightning/nodes' - } - ] - }, - { - title: 'Enterprise', - i18n: '', - items: [ - { - title: 'Settings', - i18n: '', - faIcon: 'id-card-alt', - link: '/services/enterprise/settings' - }, - { - title: 'IP Whitelist', - i18n: '', - faIcon: 'check-circle', - link: '/services/enterprise/ip-whitelist' - } - ] - } - ]); - - // return this.httpClient.get(`${SERVICES_API_PREFIX}/account`, { - // headers: { - // 'Authorization': auth.token - // } - // }); + return this.httpClient.get(`${SERVICES_API_PREFIX}/account/menu`, { + headers: { 'Authorization': auth.token } + }); } }