mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 04:26:01 +00:00
axiosInstance replaced with apiCall
This commit is contained in:
@@ -74,6 +74,7 @@
|
||||
import { showModal } from '../modals/modalTools';
|
||||
|
||||
import { currentDatabase } from '../stores';
|
||||
import { apiCall } from '../utility/api';
|
||||
|
||||
import axiosInstance from '../utility/axiosInstance';
|
||||
import getConnectionLabel from '../utility/getConnectionLabel';
|
||||
@@ -114,7 +115,7 @@
|
||||
showModal(ConfirmModal, {
|
||||
message: `Really delete file ${data.file}?`,
|
||||
onConfirm: () => {
|
||||
axiosInstance().post('files/delete', data);
|
||||
apiCall('files/delete', data);
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -125,7 +126,7 @@
|
||||
label: 'New file name',
|
||||
header: 'Rename file',
|
||||
onConfirm: newFile => {
|
||||
axiosInstance().post('files/rename', { ...data, newFile });
|
||||
apiCall('files/rename', { ...data, newFile });
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -136,13 +137,13 @@
|
||||
label: 'New file name',
|
||||
header: 'Rename file',
|
||||
onConfirm: newFile => {
|
||||
axiosInstance().post('files/copy', { ...data, newFile });
|
||||
apiCall('files/copy', { ...data, newFile });
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
async function openTab() {
|
||||
const resp = await axiosInstance().post('files/load', { folder, file: data.file, format: handler.format });
|
||||
const resp = await apiCall('files/load', { folder, file: data.file, format: handler.format });
|
||||
|
||||
const connProps: any = {};
|
||||
let tooltip = undefined;
|
||||
@@ -168,7 +169,7 @@
|
||||
...connProps,
|
||||
},
|
||||
},
|
||||
{ editor: resp.data }
|
||||
{ editor: resp }
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user