Commit 5b419345 authored by Mike Greiling's avatar Mike Greiling

Apply axios call suggestions

parent f98fd1ae
...@@ -3,7 +3,9 @@ import { normalizeHeaders, parseIntPagination } from './common_utils'; ...@@ -3,7 +3,9 @@ import { normalizeHeaders, parseIntPagination } from './common_utils';
// This is used in the select2 config to replace jQuery.ajax with axios // This is used in the select2 config to replace jQuery.ajax with axios
export const select2AxiosTransport = (params) => { export const select2AxiosTransport = (params) => {
return axios[params.type.toLowerCase()](params.url, { axios({
method: params.type?.toLowerCase() || 'get',
url: params.url,
params: params.data, params: params.data,
}) })
.then((res) => { .then((res) => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment