mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
c72e7b6040
no issue - Updated hard-coded data in member management to use real values from API
29 lines
688 B
JavaScript
29 lines
688 B
JavaScript
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
|
|
|
export default AuthenticatedRoute.extend({
|
|
model(params) {
|
|
this._isMemberUpdated = true;
|
|
return this.store.findRecord('member', params.member_id, {
|
|
reload: true
|
|
});
|
|
},
|
|
|
|
setupController(controller, model) {
|
|
this._super(...arguments);
|
|
if (!this._isMemberUpdated) {
|
|
controller.fetchMember.perform(model.get('id'));
|
|
}
|
|
},
|
|
|
|
deactivate() {
|
|
this._super(...arguments);
|
|
|
|
// clear the properties
|
|
this._isMemberUpdated = false;
|
|
},
|
|
|
|
titleToken() {
|
|
return this.controller.get('member.name');
|
|
}
|
|
});
|