Skip to content

Commit

Permalink
add maintenance to the 503 page config
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGoodall committed Dec 18, 2023
1 parent 7aaa089 commit e7ab74a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ app.use(bodyParser.urlencoded({ extended: true }))

// 503 page (for when the service is unavailable)
app.use((req, res, next) => {
if (config.serviceUnavailable) {
res.status(503).render('errorPages/503', { upTime: '9am on Monday 19 November 2024' })
if (config.maintenance.serviceUnavailable) {
res.status(503).render('errorPages/503', { upTime: config.maintenance.upTime })
} else {
next()
}
Expand Down

0 comments on commit e7ab74a

Please sign in to comment.