mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
344f3080df
No issue
23 lines
668 B
JavaScript
23 lines
668 B
JavaScript
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
|
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
|
|
import styleBody from 'ghost/mixins/style-body';
|
|
|
|
var AppsRoute = AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
|
classNames: ['settings-view-apps'],
|
|
|
|
beforeModel: function () {
|
|
if (!this.get('config.apps')) {
|
|
return this.transitionTo('settings.general');
|
|
}
|
|
|
|
return this.currentUser()
|
|
.then(this.transitionAuthor())
|
|
.then(this.transitionEditor());
|
|
},
|
|
|
|
model: function () {
|
|
return this.store.find('app');
|
|
}
|
|
});
|
|
|
|
export default AppsRoute;
|