Ghost/ghost/admin/app/components/modal-delete-subscriber.js

20 lines
484 B
JavaScript
Raw Normal View History

import ModalComponent from 'ghost-admin/components/modal-base';
import {alias} from '@ember/object/computed';
import {invokeAction} from 'ember-invoke-action';
import {task} from 'ember-concurrency';
export default ModalComponent.extend({
subscriber: alias('model'),
deleteSubscriber: task(function* () {
yield invokeAction(this, 'confirm');
}).drop(),
actions: {
confirm() {
this.get('deleteSubscriber').perform();
}
}
});