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

21 lines
465 B
JavaScript
Raw Normal View History

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()
});