mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
edfbfd7336
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
13 lines
427 B
JavaScript
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');
|
|
}
|
|
}; |