mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
e5b6db173c
- removed unused integration files (was restructured under Settings / integrations) - removed unused routes
27 lines
801 B
JavaScript
27 lines
801 B
JavaScript
import ModalComponent from 'ghost-admin/components/modal-base';
|
|
import {alias} from '@ember/object/computed';
|
|
import {inject as service} from '@ember/service';
|
|
import {task} from 'ember-concurrency';
|
|
|
|
export default ModalComponent.extend({
|
|
router: service(),
|
|
feature: service(),
|
|
notifications: service(),
|
|
integration: alias('model'),
|
|
actions: {
|
|
confirm() {
|
|
this.deleteIntegration.perform();
|
|
}
|
|
},
|
|
deleteIntegration: task(function* () {
|
|
try {
|
|
yield this.confirm();
|
|
this.router.transitionTo('settings.integrations');
|
|
} catch (error) {
|
|
this.notifications.showAPIError(error, {key: 'integration.delete.failed'});
|
|
} finally {
|
|
this.send('closeModal');
|
|
}
|
|
}).drop()
|
|
});
|