Ghost/core/client/routes/setup.js
Sebastian Gierlinger b332e8c158 Redirect setup if authenticated
closes #3145
- added beforeModel redirect
- added test
2014-07-01 12:57:44 +02:00

14 lines
417 B
JavaScript

import styleBody from 'ghost/mixins/style-body';
import loadingIndicator from 'ghost/mixins/loading-indicator';
var SetupRoute = Ember.Route.extend(styleBody, loadingIndicator, {
classNames: ['ghost-setup'],
beforeModel: function () {
if (this.get('session').isAuthenticated) {
this.transitionTo(Ember.SimpleAuth.routeAfterAuthentication);
}
}
});
export default SetupRoute;