mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 17:32:15 +03:00
d63d3f77eb
no-issue
23 lines
814 B
JavaScript
23 lines
814 B
JavaScript
const debug = require('ghost-ignition').debug('services:apps');
|
|
const Promise = require('bluebird');
|
|
const common = require('../../lib/common');
|
|
const config = require('../../config');
|
|
const loader = require('./loader');
|
|
const internalApps = config.get('apps:internal');
|
|
|
|
module.exports = {
|
|
init: function () {
|
|
debug('init begin');
|
|
const appsToLoad = internalApps;
|
|
|
|
return Promise.map(appsToLoad, appName => loader.activateAppByName(appName))
|
|
.catch(function (err) {
|
|
common.logging.error(new common.errors.GhostError({
|
|
err: err,
|
|
context: common.i18n.t('errors.apps.appWillNotBeLoaded.error'),
|
|
help: common.i18n.t('errors.apps.appWillNotBeLoaded.help')
|
|
}));
|
|
});
|
|
}
|
|
};
|