Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Commit

Permalink
Fix status code on page not found
Browse files Browse the repository at this point in the history
  • Loading branch information
ratzxx authored and NGPixel committed Nov 26, 2018
1 parent 9f20683 commit 74a140d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/controllers/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ router.get('/*', (req, res, next) => {
if (pageData) {
res.render('pages/view', { pageData })
} else {
res.render('error-notexist', {
res.status(404).render('error-notexist', {
newpath: safePath
})
}
Expand All @@ -240,7 +240,7 @@ router.get('/*', (req, res, next) => {
if (safePath === 'home') {
res.render('pages/welcome')
} else {
res.render('error-notexist', {
res.status(404).render('error-notexist', {
message: err.message,
newpath: safePath
})
Expand Down

0 comments on commit 74a140d

Please sign in to comment.