censis-archive/obrand/obrand-admin/app/routes/profile.js

19 lines
418 B
JavaScript
Raw Normal View History

2016-06-06 10:45:51 +00:00
import Ember from 'ember';
const { inject: { service }, RSVP } = Ember;
export default Ember.Route.extend({
sessionAccount: service('session-account'),
model: function() {
'use strict';
const accountId = this.get('sessionAccount.account.id');
return new RSVP.Promise((resolve,reject) => {
return this.get('store').find('profile',accountId)
.then(resolve,reject);
});
}
});