Ghost/ghost/admin/app/controllers/settings/integration/webhooks/edit.js
Peter Zimon 737db37175 Added Integrations as a subpage of Settings
- Restructured Admin so that Integrations becomes a subpage of Settings.
2021-10-18 14:47:59 +02:00

25 lines
607 B
JavaScript

import Controller from '@ember/controller';
import {alias} from '@ember/object/computed';
export default Controller.extend({
webhook: alias('model'),
actions: {
save() {
return this.webhook.save();
},
cancel() {
// 'new' route's dectivate hook takes care of rollback
return this.webhook.get('integration').then((integration) => {
this.transitionToRoute('integration', integration);
});
}
},
reset() {
this.webhook.rollbackAttributes();
this.webhook.errors.clear();
}
});