0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00
ghost/core/server/web/middleware/maintenance.js
Katharina Irrgang 7bcccc71dc
Moved apps into web folder (#9308)
refs #9178

- move express apps to one place (called `web`)
- requires https://github.com/TryGhost/Ghost-Admin/pull/923
- any further improvements are not part of this PR
- this PR just moves the files and ensures the paths are up-to-date
2017-12-06 17:37:54 +01:00

11 lines
335 B
JavaScript

var config = require('../../config'),
i18n = require('../../i18n'),
errors = require('../../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();
};