0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00
ghost/core/server/middleware/maintenance.js
kirrg001 0ae0a0b490 🎨 change how we get and set config
refs #6982
- a replace for all config usages
- always use config.get or config.set
- this a pure replacement, no logic has changed

[ci skip]
2016-09-20 15:59:34 +01:00

13 lines
321 B
JavaScript

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