UNPKG

autumn-js

Version:
18 lines (16 loc) 362 B
// src/backend/core/routes/routeBuilder.ts import { addRoute, createRouter } from "rou3"; var buildRouter = ({ pathPrefix, routes }) => { const router = createRouter(); for (const route of routes) { const fullPath = `${pathPrefix}/${route.route}`; addRoute(router, "POST", fullPath, { route }); } return router; }; export { buildRouter };