mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-17 13:31:39 +03:00
ac2578b419
refs #9178
12 lines
357 B
JavaScript
12 lines
357 B
JavaScript
var config = require('../../config'),
|
|
i18n = require('../../lib/common/i18n'),
|
|
errors = require('../../lib/common/errors');
|
|
|
|
module.exports = function maintenance(req, res, next) {
|
|
if (config.get('maintenance').enabled) {
|
|
return next(new errors.MaintenanceError({message: i18n.t('errors.general.maintenance')}));
|
|
}
|
|
|
|
next();
|
|
};
|