Skip to content

Commit

Permalink
Add page to res.locals
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwhatley committed Dec 13, 2024
1 parent fedf41a commit fba16c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ router.all('*', (req, res, next) => {
res.locals.referrer = req.query.referrer.split(',')
}

if (req.query?.page) {
res.locals.page = req.query.page
}

// Only search by the query if there is one
// (and get "undefined" instead of "{}" if there is no query)
const hasQuery = !_.isEmpty(req.query)
Expand Down

0 comments on commit fba16c7

Please sign in to comment.