Ghost/ghost/admin/app/components/modal-delete-subscriber.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

21 lines
465 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: () => {},
subscriber: alias('model'),
actions: {
confirm() {
this.get('deleteSubscriber').perform();
}
},
deleteSubscriber: task(function* () {
yield this.confirm();
}).drop()
});