You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
955 B
JavaScript
26 lines
955 B
JavaScript
3 years ago
|
import exprs from 'express';
|
||
|
const { Router } = exprs;
|
||
|
import infoECLRoutes from './getInfo.js';
|
||
|
import feesECLRoutes from './fees.js';
|
||
|
import channelsECLRoutes from './channels.js';
|
||
|
import onChainECLRoutes from './onchain.js';
|
||
|
import peersECLRoutes from './peers.js';
|
||
|
import invoicesECLRoutes from './invoices.js';
|
||
|
import paymentsECLRoutes from './payments.js';
|
||
|
import networkECLRoutes from './network.js';
|
||
|
const router = Router();
|
||
|
const eclRoutes = [
|
||
|
{ path: '/getinfo', route: infoECLRoutes },
|
||
|
{ path: '/fees', route: feesECLRoutes },
|
||
|
{ path: '/channels', route: channelsECLRoutes },
|
||
|
{ path: '/onchain', route: onChainECLRoutes },
|
||
|
{ path: '/peers', route: peersECLRoutes },
|
||
|
{ path: '/invoices', route: invoicesECLRoutes },
|
||
|
{ path: '/payments', route: paymentsECLRoutes },
|
||
|
{ path: '/network', route: networkECLRoutes }
|
||
|
];
|
||
|
eclRoutes.forEach((route) => {
|
||
|
router.use(route.path, route.route);
|
||
|
});
|
||
|
export default router;
|