summaryrefslogtreecommitdiff
blob: afe6eccdf59e46bc1b6761836ab8cf3034cff2af (plain)
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,
};