mirror of
https://github.com/mempool/mempool.git
synced 2025-03-03 17:47:01 +01:00
[menu] call services api to fetch user menu
This commit is contained in:
parent
23b871631a
commit
91e3943a74
4 changed files with 28 additions and 38 deletions
|
@ -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`,
|
||||
|
|
|
@ -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`,
|
||||
|
|
|
@ -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`,
|
||||
|
|
|
@ -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<MenuGroup[]>(`${SERVICES_API_PREFIX}/account`, {
|
||||
// headers: {
|
||||
// 'Authorization': auth.token
|
||||
// }
|
||||
// });
|
||||
return this.httpClient.get<MenuGroup[]>(`${SERVICES_API_PREFIX}/account/menu`, {
|
||||
headers: { 'Authorization': auth.token }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue