add site title to 404, on cold load anyways

This commit is contained in:
psychobunny
2015-08-27 16:30:43 -04:00
parent 4b91d7ec3d
commit 0eca875f6e
2 changed files with 11 additions and 3 deletions

View File

@@ -19,9 +19,17 @@ helpers.notFound = function(req, res, error) {
error: error
});
} else if (res.locals.isAPI) {
res.status(404).json({path: req.path.replace(/^\/api/, ''), error: error});
res.status(404).json({
path: req.path.replace(/^\/api/, ''),
error: error,
title: '[[global:404.title]]'
});
} else {
res.status(404).render('404', {path: req.path, error: error});
res.status(404).render('404', {
path: req.path,
error: error,
title: '[[global:404.title]]'
});
}
};