You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
470 B
JavaScript
27 lines
470 B
JavaScript
11 years ago
|
var staticController = {};
|
||
|
|
||
|
staticController['404'] = function(req, res, next) {
|
||
|
if (res.locals.isAPI) {
|
||
|
res.json({});
|
||
|
} else {
|
||
|
res.render('404', {});
|
||
|
}
|
||
|
};
|
||
|
|
||
|
staticController['403'] = function(req, res, next) {
|
||
|
if (res.locals.isAPI) {
|
||
|
res.json({});
|
||
|
} else {
|
||
|
res.render('403', {});
|
||
|
}
|
||
|
};
|
||
|
|
||
|
staticController['500'] = function(req, res, next) {
|
||
|
if (res.locals.isAPI) {
|
||
|
res.json({});
|
||
|
} else {
|
||
|
res.render('500', {});
|
||
|
}
|
||
|
};
|
||
|
|
||
|
module.exports = staticController;
|