0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/services/apps/proxy.js
Fabien O'Carroll ca2dc1889a Removed unused filters object from apps proxy
no-issue

This is not used by any current apps, and apps are considered
deprecated.
2019-04-16 11:05:33 +02:00

23 lines
782 B
JavaScript

const helpers = require('../../helpers/register');
const common = require('../../lib/common');
const routingService = require('../routing');
module.exports.getInstance = function getInstance(name) {
if (!name) {
throw new Error(common.i18n.t('errors.apps.mustProvideAppName.error'));
}
const appRouter = routingService.registry.getRouter('appRouter');
return {
helpers: {
register: helpers.registerThemeHelper.bind(helpers),
registerAsync: helpers.registerAsyncThemeHelper.bind(helpers)
},
// Expose the route service...
routeService: {
// This allows for mounting an entirely new Router at a path...
registerRouter: appRouter.mountRouter.bind(appRouter)
}
};
};