This repository has been archived on 2025-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
hymenobacterdotinfo/app/pods/application/route.js
2015-07-09 20:52:01 -08:00

29 lines
759 B
JavaScript

import Ember from 'ember';
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';
// import parseBase64 from '../../utils/parse-base64';
export default Ember.Route.extend(ApplicationRouteMixin, {
// model: function() {
// let token = this.get('session.secure.token');
// if (Ember.isNone(token)) {
// return null;
// }
// let user = parseBase64(token);
// return this.store.find('user', user.sub);
// },
actions: {
invalidateSession: function() {
this.get('session').invalidate().then(() => {
// Wait until promise is resolved
return true;
});
},
didTransition: function() {
this.get('flashMessages').clearMessages();
return true;
},
}
});