axiosInstance replaced with apiCall

This commit is contained in:
Jan Prochazka
2021-12-22 10:16:44 +01:00
parent 148af24b2c
commit f9c54cdce2
55 changed files with 257 additions and 328 deletions

View File

@@ -50,6 +50,7 @@
import ChangeSetGrider from '../datagrid/ChangeSetGrider';
import { setContext } from 'svelte';
import _ from 'lodash';
import { apiCall } from '../utility/api';
export let tabid;
export let conid;
@@ -91,14 +92,10 @@
// $: console.log('LOADED ROWS MONGO', loadedRows);
async function handleConfirmChange(changeSet) {
const resp = await axiosInstance().request({
url: 'database-connections/update-collection',
method: 'post',
params: {
conid,
database,
},
data: { changeSet },
const resp = await apiCall('database-connections/update-collection', {
conid,
database,
changeSet,
});
const { errorMessage } = resp.data || {};
if (errorMessage) {