UNPKG

@empathyco/x-components

Version:
21 lines (18 loc) 748 B
import '../../../../plugins/x-bus.js'; import '@empathyco/x-utils'; import { XPlugin } from '../../../../plugins/x-plugin.js'; /** * Default implementation for the {@link RecommendationsActions.fetchRecommendations}. * * @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions, * provided by Vuex. * @param request - The recommendations request to make. * @returns A `void` promise that resolves when it fetches recommendations. * * @public */ const fetchRecommendations = async (_context, request) => { return request ? XPlugin.adapter.recommendations(request).then(({ results }) => results) : []; }; export { fetchRecommendations }; //# sourceMappingURL=fetch-recommendations.action.js.map