Ghost/core/server/plugins/proxy.js
Hannah Wolfe ed6455f5a4 Direct api access for app proxy
- proxy doesn't need a ghost object :)
2013-11-29 16:26:56 +00:00

24 lines
634 B
JavaScript

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