Ghost/core/client/app/routes/signout.js
2015-03-11 12:37:41 -06:00

22 lines
642 B
JavaScript

import AuthenticatedRoute from 'ghost/routes/authenticated';
import styleBody from 'ghost/mixins/style-body';
import loadingIndicator from 'ghost/mixins/loading-indicator';
var SignoutRoute = AuthenticatedRoute.extend(styleBody, loadingIndicator, {
titleToken: 'Sign Out',
classNames: ['ghost-signout'],
afterModel: function (model, transition) {
this.notifications.clear();
if (Ember.canInvoke(transition, 'send')) {
transition.send('invalidateSession');
transition.abort();
} else {
this.send('invalidateSession');
}
}
});
export default SignoutRoute;