[menu] call services api to fetch user menu
This commit is contained in:
parent
23b871631a
commit
91e3943a74
@ -112,6 +112,14 @@ PROXY_CONFIG.push(...[
|
|||||||
"^/testnet": ""
|
"^/testnet": ""
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
context: ['/api/v1/services/**'],
|
||||||
|
target: `http://localhost:9000`,
|
||||||
|
secure: false,
|
||||||
|
ws: true,
|
||||||
|
changeOrigin: true,
|
||||||
|
proxyTimeout: 30000,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
context: ['/api/v1/**'],
|
context: ['/api/v1/**'],
|
||||||
target: `http://127.0.0.1:8999`,
|
target: `http://127.0.0.1:8999`,
|
||||||
|
@ -112,6 +112,14 @@ PROXY_CONFIG.push(...[
|
|||||||
"^/testnet": ""
|
"^/testnet": ""
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
context: ['/api/v1/services/**'],
|
||||||
|
target: `http://localhost:9000`,
|
||||||
|
secure: false,
|
||||||
|
ws: true,
|
||||||
|
changeOrigin: true,
|
||||||
|
proxyTimeout: 30000,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
context: ['/api/v1/**'],
|
context: ['/api/v1/**'],
|
||||||
target: `http://localhost:8999`,
|
target: `http://localhost:8999`,
|
||||||
|
@ -95,6 +95,14 @@ if (configContent && configContent.BASE_MODULE === 'bisq') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PROXY_CONFIG.push(...[
|
PROXY_CONFIG.push(...[
|
||||||
|
{
|
||||||
|
context: ['/api/v1/services/**'],
|
||||||
|
target: `http://localhost:9000`,
|
||||||
|
secure: false,
|
||||||
|
ws: true,
|
||||||
|
changeOrigin: true,
|
||||||
|
proxyTimeout: 30000,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
context: ['/api/v1/**'],
|
context: ['/api/v1/**'],
|
||||||
target: `http://localhost:8999`,
|
target: `http://localhost:8999`,
|
||||||
|
@ -9,6 +9,7 @@ import { Outspend, Transaction } from '../interfaces/electrs.interface';
|
|||||||
import { Conversion } from './price.service';
|
import { Conversion } from './price.service';
|
||||||
import { MenuGroup } from '../interfaces/services.interface';
|
import { MenuGroup } from '../interfaces/services.interface';
|
||||||
|
|
||||||
|
// Todo - move to config.json
|
||||||
const SERVICES_API_PREFIX = `/api/v1/services`;
|
const SERVICES_API_PREFIX = `/api/v1/services`;
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
@ -348,43 +349,8 @@ export class ApiService {
|
|||||||
return of(null);
|
return of(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return of([
|
return this.httpClient.get<MenuGroup[]>(`${SERVICES_API_PREFIX}/account/menu`, {
|
||||||
{
|
headers: { 'Authorization': auth.token }
|
||||||
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
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user