Merge pull request #219 from RasCarlito/fix-readme-http-example
Fix choo/http usage example in README.md
This commit is contained in:
@@ -298,7 +298,7 @@ app.model({
|
|||||||
state: { items: [] },
|
state: { items: [] },
|
||||||
effects: {
|
effects: {
|
||||||
addAndSave: (data, state, send, done) => {
|
addAndSave: (data, state, send, done) => {
|
||||||
http.post('/todo', {body: data.payload, json: true}, (err, res, body) => {
|
http.post('/todo', {json: data.payload}, (err, res, body) => {
|
||||||
data.payload.id = body.id
|
data.payload.id = body.id
|
||||||
send('todos:add', data, done)
|
send('todos:add', data, done)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user