censis-archive/obrand/obrand-admin/app/routes/profile.js
2016-06-06 11:45:51 +01:00

19 lines
418 B
JavaScript

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);
});
}
});