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

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