2014-06-01 23:30:50 +04:00
|
|
|
import styleBody from 'ghost/mixins/style-body';
|
2014-06-05 07:18:23 +04:00
|
|
|
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
2014-06-01 23:30:50 +04:00
|
|
|
|
2014-06-30 16:58:10 +04:00
|
|
|
var SignoutRoute = Ember.Route.extend(Ember.SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, {
|
2014-06-01 23:30:50 +04:00
|
|
|
classNames: ['ghost-signout'],
|
|
|
|
|
2014-06-30 16:58:10 +04:00
|
|
|
afterModel: function (resolvedModel, transition) {
|
|
|
|
if (Ember.canInvoke(transition, 'send')) {
|
|
|
|
transition.abort();
|
|
|
|
transition.send('invalidateSession');
|
|
|
|
this.transitionTo('signin');
|
|
|
|
} else {
|
|
|
|
this.send('invalidateSession');
|
|
|
|
}
|
2014-06-01 23:30:50 +04:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-06-13 23:35:22 +04:00
|
|
|
export default SignoutRoute;
|