open-vault/ui/app/routes/vault/cluster/logout.js
2018-04-03 09:16:57 -05:00

17 lines
454 B
JavaScript

import Ember from 'ember';
import ModelBoundaryRoute from 'vault/mixins/model-boundary-route';
export default Ember.Route.extend(ModelBoundaryRoute, {
auth: Ember.inject.service(),
flashMessages: Ember.inject.service(),
modelTypes: ['secret', 'secret-engine'],
beforeModel() {
this.get('auth').deleteCurrentToken();
this.clearModelCache();
this.replaceWith('vault.cluster');
this.get('flashMessages').clearMessages();
},
});