0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/core/server/plugins/proxy.js

25 lines
718 B
JavaScript
Raw Normal View History

var _ = require('underscore'),
helpers = require('../helpers'),
filters = require('../filters');
function createProxy(ghost) {
return {
filters: {
register: filters.registerFilter,
unregister: filters.unregisterFilter
},
helpers: {
register: helpers.registerThemeHelper,
registerAsync: helpers.registerAsyncThemeHelper
},
api: {
posts: _.pick(ghost.api.posts, 'browse', 'read'),
tags: ghost.api.tags,
notifications: _.pick(ghost.api.notifications, 'add'),
settings: _.pick(ghost.api.settings, 'read')
}
};
}
module.exports = createProxy;