Refactor add-contributor component to DDAU

This commit is contained in:
2018-04-06 14:04:44 +02:00
committed by Michael Bumann
parent fa7db66f4e
commit 8f841522a3
7 changed files with 101 additions and 95 deletions
+8 -3
View File
@@ -116,13 +116,18 @@ export default Ember.Controller.extend({
actions: {
confirmProposal(proposalId) {
this.get('kredits').vote(proposalId).then(transaction => {
window.confirm('Vote submitted to Ethereum blockhain: '+transaction.hash);
});
},
save(contributor) {
return this.get('kredits').addContributor(contributor)
.then((contributor) => {
this.get('model.contributors').pushObject(contributor);
return contributor;
});
}
}
});