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

20 lines
477 B
JavaScript

import {alias} from 'ember-computed';
import ModalComponent from 'ghost-admin/components/modals/base';
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();
}
}
});