Add proposal form
Closes #6 Form can be prefilled using query params on the route. The params are `recipient`, `amount`, `url` and `ipfsHash`.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import Ember from 'ember';
|
||||
import Proposal from 'kredits-web/models/proposal';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
|
||||
model(params) {
|
||||
return Proposal.create({
|
||||
recipientAddress: params.recipient,
|
||||
amount: params.amount,
|
||||
url: params.url,
|
||||
ipfsHash: params.ipfsHash
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user