The request includes an authorization header with the bearer token we got from the API during the Facebook oauth flow.
On submittal, the API should respond with a 201 Created and return a payload with the created proposal. We don't need to do anything with this yet, this is a big enough scope for this issue, I think.
Please let me know if anything doesn't make sense or isn't familiar.
I'd say implementation is at 90% right now, but as you noticed, I put the horses before the carriage and now the compiler errors are a little overwhelming. I'd start by getting the Proposal encoding working. After that, I expect the compiler errors will be a lot more helpful.
Feel free to backtrack the commits til something is compiling, but I ask that you then go adding pieces back in while keeping with the current architecture and naming conventions, diverging only when really necessary.
Please submit a WIP pull request once you have your own branch going, so I can follow progress and comment along.
User story:
After login, user sees the
Home
route, and a link to "Create a Proposal".Clicking on the link will change route to
NewProposalRoute
(we're using sporto/hop for routing), and render a view with the new proposal formThe form includes title and body (not implemented yet) fields, and a submit button. It uses https://github.com/debois/elm-mdl elements.
When submitted, it sends a
POST /proposals
request with the following JSON-API payload:The request includes an authorization header with the bearer token we got from the API during the Facebook oauth flow.
On submittal, the API should respond with a
201 Created
and return a payload with the created proposal. We don't need to do anything with this yet, this is a big enough scope for this issue, I think.Please let me know if anything doesn't make sense or isn't familiar.
I'd say implementation is at 90% right now, but as you noticed, I put the horses before the carriage and now the compiler errors are a little overwhelming. I'd start by getting the Proposal encoding working. After that, I expect the compiler errors will be a lot more helpful.
Feel free to backtrack the commits til something is compiling, but I ask that you then go adding pieces back in while keeping with the current architecture and naming conventions, diverging only when really necessary.
Please submit a WIP pull request once you have your own branch going, so I can follow progress and comment along.