diff options
Diffstat (limited to 'plugins/jetpack/extensions/blocks/publicize/store/controls.js')
-rw-r--r-- | plugins/jetpack/extensions/blocks/publicize/store/controls.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/jetpack/extensions/blocks/publicize/store/controls.js b/plugins/jetpack/extensions/blocks/publicize/store/controls.js new file mode 100644 index 00000000..afe6eccd --- /dev/null +++ b/plugins/jetpack/extensions/blocks/publicize/store/controls.js @@ -0,0 +1,19 @@ +/** + * External dependencies + */ +import apiFetch from '@wordpress/api-fetch'; + +/** + * Trigger an API Fetch request. + * + * @param {Object} action Action Object. + * + * @return {Promise} Fetch request promise. + */ +const fetchFromApi = ( { path } ) => { + return apiFetch( { path } ); +}; + +export default { + FETCH_FROM_API: fetchFromApi, +}; |