0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/routes/signout.js
2014-07-25 16:04:19 +02:00

18 lines
594 B
JavaScript

import styleBody from 'ghost/mixins/style-body';
import loadingIndicator from 'ghost/mixins/loading-indicator';
var SignoutRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, {
classNames: ['ghost-signout'],
afterModel: function (resolvedModel, transition) {
if (Ember.canInvoke(transition, 'send')) {
transition.send('invalidateSession');
transition.abort();
this.transitionTo('signin');
} else {
this.send('invalidateSession');
}
}
});
export default SignoutRoute;