diff --git a/app/components/add-contributor/component.js b/app/components/add-contributor/component.js index 118aba3..51e3794 100644 --- a/app/components/add-contributor/component.js +++ b/app/components/add-contributor/component.js @@ -8,6 +8,7 @@ import { isAddress } from 'web3-utils'; export default Component.extend({ kredits: service(), + router: service(), attributes: null, @@ -75,6 +76,7 @@ export default Component.extend({ window.alert('Something went wrong. Please check the browser console.'); }).finally(() => { this.set('inProgress', false); + this.router.transitionTo('dashboard'); }); } diff --git a/app/controllers/contributors/edit.js b/app/controllers/contributors/edit.js index 5e42802..f70e03f 100644 --- a/app/controllers/contributors/edit.js +++ b/app/controllers/contributors/edit.js @@ -8,9 +8,7 @@ export default Controller.extend({ actions: { save (attributes) { - return this.kredits - .updateContributor(this.model.id, attributes) - .then(() => this.transitionToRoute('index')) + return this.kredits.updateContributor(this.model.id, attributes); } } diff --git a/app/controllers/contributors/new.js b/app/controllers/contributors/new.js index 5bc88f0..4f08aef 100644 --- a/app/controllers/contributors/new.js +++ b/app/controllers/contributors/new.js @@ -8,9 +8,7 @@ export default Controller.extend({ actions: { save (contributor) { - return this.kredits - .addContributor(contributor) - .then(() => this.transitionToRoute('index')) + return this.kredits.addContributor(contributor); } }