Fixed default route
This commit is contained in:
parent
2dd52a0c1d
commit
e11bea21ea
@ -16,9 +16,9 @@ Router.use('/', frontend_routes);
|
|||||||
Router.all('*', function (req, res) {
|
Router.all('*', function (req, res) {
|
||||||
// TODO: Respond based on content-type (with req.is('application/json'))
|
// TODO: Respond based on content-type (with req.is('application/json'))
|
||||||
if (req.is('application/json')) {
|
if (req.is('application/json')) {
|
||||||
res.status(418)//.json({ errorcode: '404' });
|
res.status(404).json({ errorcode: 'NOT_FOUND', error: 'Not Found!' });
|
||||||
} else {
|
} else {
|
||||||
res.status(418)//.render(__path + '/src/frontend/errors/404.eta.html', { url: req.originalUrl });
|
res.status(404).render(__path + '/src/frontend/errors/404.eta.html', { url: req.originalUrl });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user