mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 17:32:15 +03:00
065182c586
refs https://github.com/TryGhost/Ghost/issues/10137 - when closing the edit webhook modal we were rolling back the changed attributes of the webhook model but not clearing the errors object which meant a validation error was shown when re-opening the edit webhook modal - add `reset()` method to the webhook edit controller and call that when leaving the edit route instead of only rolling back the changed attributes
15 lines
363 B
JavaScript
15 lines
363 B
JavaScript
import Route from '@ember/routing/route';
|
|
|
|
export default Route.extend({
|
|
model(params) {
|
|
let integration = this.modelFor('settings.integration');
|
|
let webhook = integration.webhooks.findBy('id', params.webhook_id);
|
|
return webhook;
|
|
},
|
|
|
|
deactivate() {
|
|
this._super(...arguments);
|
|
this.controller.reset();
|
|
}
|
|
});
|