2
0
mirror of https://github.com/Ride-The-Lightning/RTL synced 2024-11-11 13:10:41 +00:00
RTL/server/routes/eclair/index.ts
ShahanaFarooqui bea5980c6f
Release 0.12.0 (#916)
Release 0.12.0
2021-12-29 18:08:41 -05:00

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;