mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 19:52:01 +03:00
bb490e4bbd
fixes #3031 - Adds an initializer for passing config to the frontend, it's not pretty but it works - Forwards the apps route and hides the apps menu item if apps:true is not present in config.js
15 lines
346 B
JavaScript
15 lines
346 B
JavaScript
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
|
|
|
var AppsRoute = AuthenticatedRoute.extend({
|
|
beforeModel: function () {
|
|
if (!this.get('config.apps')) {
|
|
this.transitionTo('settings.general');
|
|
}
|
|
},
|
|
model: function () {
|
|
return this.store.find('app');
|
|
}
|
|
});
|
|
|
|
export default AppsRoute;
|