Prevent transition abortion on contributor save
This commit is contained in:
@@ -8,6 +8,7 @@ import { isAddress } from 'web3-utils';
|
|||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
|
|
||||||
kredits: service(),
|
kredits: service(),
|
||||||
|
router: service(),
|
||||||
|
|
||||||
attributes: null,
|
attributes: null,
|
||||||
|
|
||||||
@@ -75,6 +76,7 @@ export default Component.extend({
|
|||||||
window.alert('Something went wrong. Please check the browser console.');
|
window.alert('Something went wrong. Please check the browser console.');
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.set('inProgress', false);
|
this.set('inProgress', false);
|
||||||
|
this.router.transitionTo('dashboard');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ export default Controller.extend({
|
|||||||
actions: {
|
actions: {
|
||||||
|
|
||||||
save (attributes) {
|
save (attributes) {
|
||||||
return this.kredits
|
return this.kredits.updateContributor(this.model.id, attributes);
|
||||||
.updateContributor(this.model.id, attributes)
|
|
||||||
.then(() => this.transitionToRoute('index'))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ export default Controller.extend({
|
|||||||
actions: {
|
actions: {
|
||||||
|
|
||||||
save (contributor) {
|
save (contributor) {
|
||||||
return this.kredits
|
return this.kredits.addContributor(contributor);
|
||||||
.addContributor(contributor)
|
|
||||||
.then(() => this.transitionToRoute('index'))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user