1
0
mirror of synced 2025-12-19 18:10:59 -05:00
Files
docs/middleware/find-page.js
2022-09-12 12:12:07 +00:00

11 lines
222 B
JavaScript

export default function findPage(req, res, next) {
const page = req.context.pages[req.pagePath]
if (page) {
req.context.page = page
req.context.page.version = req.context.currentVersion
}
return next()
}