DSS-5869 Adds Template: logout, Adds Route: logout

This commit is contained in:
Seyi Adebajo 2017-02-13 15:04:11 -08:00 committed by Mars Lan
parent 8115d4f2ab
commit 55e04ff115
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,17 @@
import Ember from 'ember';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
const {Route, inject: {service}} = Ember;
export default Route.extend(AuthenticatedRouteMixin, {
session: service(),
actions: {
didTransition() {
Ember.$.get('/logout').then(() => {
this.get('session').invalidate();
});
}
}
})

View File

@ -0,0 +1 @@
{{outlet}}