From 386fba9c7d582e02e131c2f08da11dbeae24b8bb Mon Sep 17 00:00:00 2001 From: Dream Date: Tue, 22 Aug 2017 18:44:49 +0800 Subject: [PATCH 1/2] fix GET_MANY missing id --- src/restClient.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/restClient.js b/src/restClient.js index 3ae6ddd..78e6342 100644 --- a/src/restClient.js +++ b/src/restClient.js @@ -67,6 +67,7 @@ export default (client, options = {}) => { return {data: {...response, id: response[idKey]}} case CREATE: return {data: {...params.data, id: response[idKey]}} + case GET_MANY: // fix GET_MANY missing id case GET_LIST: response.data = response.data.map(item => { if (idKey !== 'id') { From 9a45c2b6181f9fec1481f3b78000b1c82e2be3ef Mon Sep 17 00:00:00 2001 From: Dream Date: Tue, 22 Aug 2017 19:31:41 +0800 Subject: [PATCH 2/2] fix GET_MANY_REFERENCE missing id in accordance with https://marmelab.com/admin-on-rest/RestClients.html#response-format --- src/restClient.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/restClient.js b/src/restClient.js index 78e6342..41afa1c 100644 --- a/src/restClient.js +++ b/src/restClient.js @@ -67,6 +67,7 @@ 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 => {