UNPKG

@ministryofjustice/hmpps-digital-prison-reporting-frontend

Version:

The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.

27 lines (24 loc) 1.12 kB
import { Router } from 'express'; import UserReportsController from './controller.js'; import routes from './bookmarks/routes.js'; import routes$1 from './recently-viewed/routes.js'; import routes$2 from './requested-reports/routes.js'; import routes$3 from './subscriptions/routes.js'; /* eslint-disable no-param-reassign */ function Routes({ layoutPath, services }) { const router = Router({ mergeParams: true }); const userReportsController = new UserReportsController(layoutPath, services); router.get(`/`, userReportsController.GET); router.use(`/bookmarks`, routes({ layoutPath, services })); router.use(`/recently-viewed`, routes$1({ layoutPath, services })); router.use(`/requested-reports`, routes$2({ layoutPath, services })); router.use(`/subscriptions`, routes$3({ layoutPath, services })); return router; } const MyReportsRoutes = ({ services, path, layoutPath, }) => { const router = Router({ mergeParams: true }); router.use(path, Routes({ services, layoutPath })); return router; }; export { MyReportsRoutes, Routes }; //# sourceMappingURL=routes.js.map