Ride-The-Lightning-RTL/backend/routes/cln/index.js
ShahanaFarooqui 475b47b7ea
Release 0.15.0 (#1334)
c-lightning-REST to clnrest migration.
2023-12-05 20:32:05 -08:00

28 lines
1.0 KiB
JavaScript

import exprs from 'express';
const { Router } = exprs;
import infoCLRoutes from './getInfo.js';
import channelsCLRoutes from './channels.js';
import invoicesCLRoutes from './invoices.js';
import onChainCLRoutes from './onchain.js';
import paymentsCLRoutes from './payments.js';
import peersCLRoutes from './peers.js';
import networkCLRoutes from './network.js';
import offersCLRoutes from './offers.js';
import utilityCLRoutes from './utility.js';
const router = Router();
const clRoutes = [
{ path: '/getinfo', route: infoCLRoutes },
{ path: '/channels', route: channelsCLRoutes },
{ path: '/invoices', route: invoicesCLRoutes },
{ path: '/onchain', route: onChainCLRoutes },
{ path: '/payments', route: paymentsCLRoutes },
{ path: '/peers', route: peersCLRoutes },
{ path: '/network', route: networkCLRoutes },
{ path: '/offers', route: offersCLRoutes },
{ path: '/utility', route: utilityCLRoutes }
];
clRoutes.forEach((route) => {
router.use(route.path, route.route);
});
export default router;