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

18 lines
423 B
JavaScript

import Ember from 'ember';
const { inject: { service } } = Ember;
export default Ember.Route.extend({
sessionAccount: service('session-account'),
beforeModel() {
'use strict';
const cid = this.get('sessionAccount.account.memberof');
this.store.query('page', { filter: { cid: cid } }).then(function(d) {
return d;
});
},
model: function() {
return this.store.findAll('page');
}
});