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

22 lines
466 B
JavaScript
Raw Normal View History

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