mirror of
https://github.com/Ride-The-Lightning/RTL
synced 2024-10-31 09:20:27 +00:00
30 lines
941 B
TypeScript
30 lines
941 B
TypeScript
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;
|