Ghost/ghost/admin/app/controllers/settings/integration/webhooks/edit.js
Gabriel Csapo d51f2bcf23 [chore] migrate to eslint@8 and run --fix (#2256)
closes https://github.com/TryGhost/Admin/pull/2107

- updated related babel dependencies
- bumped eslint
- ran `yarn lint:js --fix`
- added eslint ignore comments for some required non-camel-case properties
2022-02-10 10:41:36 +00:00

29 lines
703 B
JavaScript

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