Ghost/core/client/app/routes/signout.js
Austin Burdine 980c864f68 fix logging out from editor page
closes #6514
- removes transition.abort from the signout method because it can override the ember-simple-auth's page refresh
2016-02-16 20:07:03 -06:00

26 lines
603 B
JavaScript

import Ember from 'ember';
import AuthenticatedRoute from 'ghost/routes/authenticated';
import styleBody from 'ghost/mixins/style-body';
const {
canInvoke,
inject: {service}
} = Ember;
export default AuthenticatedRoute.extend(styleBody, {
titleToken: 'Sign Out',
classNames: ['ghost-signout'],
notifications: service(),
afterModel(model, transition) {
this.get('notifications').clearAll();
if (canInvoke(transition, 'send')) {
transition.send('invalidateSession');
} else {
this.send('invalidateSession');
}
}
});