1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 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, };