Ghost/core/server/apps/proxy.js

25 lines
687 B
JavaScript
Raw Normal View History

2014-02-05 12:40:30 +04:00
var _ = require('lodash'),
api = require('../api'),
helpers = require('../helpers'),
filters = require('../filters');
var proxy = {
filters: {
register: filters.registerFilter.bind(filters),
unregister: filters.unregisterFilter.bind(filters)
},
helpers: {
register: helpers.registerThemeHelper.bind(helpers),
registerAsync: helpers.registerAsyncThemeHelper.bind(helpers)
},
api: {
posts: _.pick(api.posts, 'browse', 'read'),
tags: api.tags,
notifications: _.pick(api.notifications, 'add'),
settings: _.pick(api.settings, 'read')
}
};
module.exports = proxy;