Skip to content

Commit

Permalink
Undocumented: Stringify POST body properly in updateJetpackModuleSett…
Browse files Browse the repository at this point in the history
…ings()
  • Loading branch information
tyxla committed Dec 9, 2016
1 parent d64fae1 commit 1e1694c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/lib/wpcom-undocumented/lib/undocumented.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Undocumented.prototype.updateJetpackModuleSettings = function( siteId, moduleSlu
//@TODO: implement and test this endpoint, it's currently not working
return this.wpcom.req.post(
{ path: '/jetpack-blogs/' + siteId + '/rest-api/' },
{ path: '/module/' + moduleSlug, body: settings },
{ path: '/module/' + moduleSlug, body: JSON.stringify( settings ) },
fn
);
};
Expand Down
4 changes: 2 additions & 2 deletions client/state/jetpack-settings/module-settings/test/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ describe( 'actions', () => {
.persist()
.post( '/rest/v1.1/jetpack-blogs/' + siteId + '/rest-api/', {
path: '/module/' + moduleSlug,
body: settings
body: JSON.stringify( settings )
} )
.reply( 200, {
code: 'success'
Expand Down Expand Up @@ -145,7 +145,7 @@ describe( 'actions', () => {
.persist()
.post( '/rest/v1.1/jetpack-blogs/' + siteId + '/rest-api/', {
path: '/module/' + moduleSlug,
body: settings
body: JSON.stringify( settings )
} )
.reply( 400, {
message: 'Invalid option: setting_1'
Expand Down

0 comments on commit 1e1694c

Please sign in to comment.