Remove unneeded user model hook

This commit is contained in:
Matthew Dillon 2015-10-14 11:25:20 -07:00
parent 0c8fc4db6c
commit 0dbcd45c4e

View file

@ -1,14 +1,7 @@
import Ember from 'ember'; import Ember from 'ember';
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin'; import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
import parseBase64 from '../../utils/parse-base64';
export default Ember.Route.extend(AuthenticatedRouteMixin, { export default Ember.Route.extend(AuthenticatedRouteMixin, {
model: function() {
let token = this.get('session.secure.token');
let user = parseBase64(token);
return this.store.find('user', user.sub);
},
actions: { actions: {
error: function() { error: function() {
this.transitionTo('/not-found'); this.transitionTo('/not-found');