Ghost/ghost/admin/app/components/modal-delete-user.js
Austin Burdine ad5528b078 Remove ember-invoke-action (#978)
closes TryGhost/Ghost#9477
- remove ember-invoke-action in favor of straight function calls
2018-03-20 14:57:59 +00:00

25 lines
532 B
JavaScript

import ModalComponent from 'ghost-admin/components/modal-base';
import {alias} from '@ember/object/computed';
import {task} from 'ember-concurrency';
export default ModalComponent.extend({
// Allowed actions
confirm: () => {},
user: alias('model'),
actions: {
confirm() {
this.get('deleteUser').perform();
}
},
deleteUser: task(function* () {
try {
yield this.confirm();
} finally {
this.send('closeModal');
}
}).drop()
});