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.

22 lines
348 B
JavaScript

11 years ago
"use strict";
var staticController = {};
11 years ago
createStatic('404');
createStatic('403');
createStatic('500');
11 years ago
function createStatic(statusCode) {
staticController[statusCode] = function(req, res) {
if (!res.locals.isAPI) {
res.statusCode = parseInt(statusCode, 10);
}
11 years ago
11 years ago
res.render(statusCode, {});
};
}
11 years ago
module.exports = staticController;
11 years ago