diff --git a/client/lib/wpcom-undocumented/lib/undocumented.js b/client/lib/wpcom-undocumented/lib/undocumented.js index 50a6c724da460..7c79dfe465424 100644 --- a/client/lib/wpcom-undocumented/lib/undocumented.js +++ b/client/lib/wpcom-undocumented/lib/undocumented.js @@ -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 ); }; diff --git a/client/state/jetpack-settings/module-settings/test/actions.js b/client/state/jetpack-settings/module-settings/test/actions.js index 8fa2368d66fbd..9d4a8a4055670 100644 --- a/client/state/jetpack-settings/module-settings/test/actions.js +++ b/client/state/jetpack-settings/module-settings/test/actions.js @@ -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' @@ -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'