mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 20:26:00 +00:00
axiosInstance replaced with apiCall
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
import { showModal } from '../modals/modalTools';
|
||||
import SaveArchiveModal from '../modals/SaveArchiveModal.svelte';
|
||||
import useEditorData from '../query/useEditorData';
|
||||
import { apiCall } from '../utility/api';
|
||||
import { markArchiveFileAsDataSheet } from '../utility/archiveTools';
|
||||
import axiosInstance from '../utility/axiosInstance';
|
||||
import { changeTab } from '../utility/common';
|
||||
@@ -61,10 +62,7 @@
|
||||
|
||||
const { setEditorData, editorState } = useEditorData({
|
||||
tabid,
|
||||
loadFromArgs:
|
||||
initialArgs && initialArgs.functionName
|
||||
? () => axiosInstance().post('runners/load-reader', initialArgs).then(x => x.data)
|
||||
: null,
|
||||
loadFromArgs: initialArgs && initialArgs.functionName ? () => apiCall('runners/load-reader', initialArgs) : null,
|
||||
onInitialData: value => {
|
||||
dispatchModel({ type: 'reset', value });
|
||||
},
|
||||
@@ -84,7 +82,7 @@
|
||||
}
|
||||
|
||||
const doSave = async (folder, file) => {
|
||||
await axiosInstance().post('archive/save-free-table', { folder, file, data: $modelState.value });
|
||||
await apiCall('archive/save-free-table', { folder, file, data: $modelState.value });
|
||||
changeTab(tabid, tab => ({
|
||||
...tab,
|
||||
title: file,
|
||||
|
||||
Reference in New Issue
Block a user