Skip to content

Commit

Permalink
Merge pull request #461 from nhsuk/fix/scrape-search-results
Browse files Browse the repository at this point in the history
move the search index function to an endpoint
  • Loading branch information
chrimesdev authored Dec 12, 2019
2 parents 7d0cfd3 + dd7beec commit d0cd294
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ app.get('/service-manual/robots.txt', (_, res) => {
res.render('robots.txt');
});

// Reindex the search results
app.get('/service-manual/scrape', (_, res) => {
pageIndex.init();
});

// Render 404 page
app.get('*', (_, res) => {
res.statusCode = 404;
Expand Down

0 comments on commit d0cd294

Please sign in to comment.