UNPKG

404 BJavaScriptView Raw
1import copy from 'fast-copy';
2/**
3 * Creates request parameters configuration by parsing an existing query object
4 * @private
5 * @param {Object} query
6 * @return {Object} Config object with `params` property, ready to be used in axios
7 */
8export default function createRequestConfig({ query }) {
9 const config = {};
10 delete query.resolveLinks;
11 config.params = copy(query);
12 return config;
13}