From dc3c9df5113089e963e29fdedbcd08e1c06a9332 Mon Sep 17 00:00:00 2001 From: Edygar de Lima Oliveira Date: Mon, 7 Nov 2016 12:11:20 +0000 Subject: [PATCH 1/4] New release --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8066b12..ab248e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ 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.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..e0b59dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redux-wpapi", - "version": "1.3.1", + "version": "1.3.2", "description": "Wordpress integration Redux middleware based on node-wpapi.", "main": "lib/index.js", "files": [ From 716f8b887cb0310f7e2d1a7a1796d9cdd24602af Mon Sep 17 00:00:00 2001 From: Edygar de Lima Oliveira Date: Wed, 30 Nov 2016 17:25:54 +0000 Subject: [PATCH 2/4] Quick fix on wpapi adapter --- CHANGELOG.md | 3 +++ src/adapters/wpapi.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab248e2..98bf56d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ 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] +* 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)) diff --git a/src/adapters/wpapi.js b/src/adapters/wpapi.js index f4fde18..59a4f00 100644 --- a/src/adapters/wpapi.js +++ b/src/adapters/wpapi.js @@ -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); } } From c9ea47123c068c2f338810fc8a060c72faf0616f Mon Sep 17 00:00:00 2001 From: Edygar de Lima Oliveira Date: Wed, 30 Nov 2016 17:36:51 +0000 Subject: [PATCH 3/4] Exposes body as a parameter --- src/adapters/wpapi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapters/wpapi.js b/src/adapters/wpapi.js index 59a4f00..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 }; } From a7a8eedebf966ed2d1e41329c4776264bf5fb751 Mon Sep 17 00:00:00 2001 From: Edygar de Lima Oliveira Date: Fri, 2 Dec 2016 14:13:47 +0000 Subject: [PATCH 4/4] New release --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98bf56d..ce71c80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ 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] diff --git a/package.json b/package.json index e0b59dd..007ac8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redux-wpapi", - "version": "1.3.2", + "version": "1.3.3", "description": "Wordpress integration Redux middleware based on node-wpapi.", "main": "lib/index.js", "files": [