0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/server/web/middleware/maintenance.js

13 lines
339 B
JavaScript
Raw Normal View History

var config = require('../../config'),
common = require('../../lib/common');
module.exports = function maintenance(req, res, next) {
if (config.get('maintenance').enabled) {
return next(new common.errors.MaintenanceError({
message: common.i18n.t('errors.general.maintenance')
}));
}
next();
};