Skip to content

Commit

Permalink
Merge pull request #38 from dreamrace/fix-mapresponse-missing-id
Browse files Browse the repository at this point in the history
Fix mapresponse missing id handling
  • Loading branch information
josx authored Aug 22, 2017
2 parents fe04ceb + 9a45c2b commit 62136e4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/restClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ export default (client, options = {}) => {
return {data: {...response, id: response[idKey]}}
case CREATE:
return {data: {...params.data, id: response[idKey]}}
case GET_MANY_REFERENCE: // fix GET_MANY_REFERENCE missing id
case GET_MANY: // fix GET_MANY missing id
case GET_LIST:
response.data = response.data.map(item => {
if (idKey !== 'id') {
Expand Down

0 comments on commit 62136e4

Please sign in to comment.