Skip to content

Commit d63f7f0

Browse files
authored
Merge pull request #167 from aceofspades/patch-1
Use httpHeader for GET_MANY
2 parents 8b56786 + a8aad6f commit d63f7f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rest/jsonServer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default (apiUrl, httpClient = fetchJson) => {
111111
return (type, resource, params) => {
112112
// json-server doesn't handle WHERE IN requests, so we fallback to calling GET_ONE n times instead
113113
if (type === GET_MANY) {
114-
return Promise.all(params.ids.map(id => fetchJson(`${apiUrl}/${resource}/${id}`)))
114+
return Promise.all(params.ids.map(id => httpClient(`${apiUrl}/${resource}/${id}`)))
115115
.then(responses => responses.map(response => response.json));
116116
}
117117
const { url, options } = convertRESTRequestToHTTP(type, resource, params);

0 commit comments

Comments
 (0)