diff --git a/CHANGELOG.md b/CHANGELOG.md index 8066b12..ce71c80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,10 @@ Some guidelines in reading this document: * Being that these are the early days of the repository, we have some code changes that were added directly and without much detail, for these we have a link to the commit instead of the PR. * Annotations starting with **[BC]** indicates breaking change. -## [new release] +## [1.3.3] +* WPAPI adapter: body of modifying requests wasn't being sent due a typo. + +## [1.3.2] * Fix [#26](https://github.com/log-oscon/redux-wpapi/issues/26): Incoming partial resources shouldn't change the complete resource in cache to partial, just update it. ([#27](https://github.com/log-oscon/redux-wpapi/pull/27)) ## [1.3.1] diff --git a/package.json b/package.json index 0a17030..007ac8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redux-wpapi", - "version": "1.3.1", + "version": "1.3.3", "description": "Wordpress integration Redux middleware based on node-wpapi.", "main": "lib/index.js", "files": [ diff --git a/src/adapters/wpapi.js b/src/adapters/wpapi.js index f4fde18..8284fba 100644 --- a/src/adapters/wpapi.js +++ b/src/adapters/wpapi.js @@ -288,7 +288,7 @@ export default class WPAPIAdapter { */ buildRequest({ request: requestBuilder, additionalParams }) { const wpRequest = requestBuilder(this.api); - const { operation = 'get', ttl, ...body } = additionalParams; + const { operation = 'get', ttl, body } = additionalParams; return { wpRequest, operation, body, ttl }; } @@ -302,8 +302,8 @@ export default class WPAPIAdapter { * @param {Object} request Provided by consumer through the action `request` param * @return {Promise} The future result of the operation */ - sendRequest({ wpRequest, operation }) { + sendRequest({ wpRequest, operation, body }) { // Embeds any directly embeddable resource linked to current resource(s) - return wpRequest.embed()[operation](wpRequest._body); + return wpRequest.embed()[operation](body); } }