Ghost/ghost/admin/initializers/ghost-paths.js
Jacob Gable edfbfd7336 Add ghostPaths util and initializer
No Issue

- Move the ghostPaths from base model to utils
- Add initializer that injects it into every route, model and controller
- Add a adminUrl and apiUrl helper method
2014-05-24 08:52:47 +02:00

13 lines
427 B
JavaScript

import ghostPaths from 'ghost/utils/ghost-paths';
export default {
name: 'ghost-paths',
initialize: function (container) {
container.register('ghost:paths', ghostPaths(), {instantiate: false});
container.injection('route', 'ghostPaths', 'ghost:paths');
container.injection('model', 'ghostPaths', 'ghost:paths');
container.injection('controller', 'ghostPaths', 'ghost:paths');
}
};