mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 11:56:00 +00:00
axiosInstance replaced with apiCall
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import FormProvider from '../forms/FormProvider.svelte';
|
||||
import FormSubmit from '../forms/FormSubmit.svelte';
|
||||
import FormTextField from '../forms/FormTextField.svelte';
|
||||
import { apiCall } from '../utility/api';
|
||||
|
||||
import axiosInstance from '../utility/axiosInstance';
|
||||
import getElectron from '../utility/getElectron';
|
||||
@@ -22,7 +23,7 @@
|
||||
|
||||
const handleSubmit = async e => {
|
||||
const { name } = e.detail;
|
||||
await axiosInstance().post('files/save', { folder, file: name, data, format });
|
||||
await apiCall('files/save', { folder, file: name, data, format });
|
||||
closeCurrentModal();
|
||||
if (onSave) {
|
||||
onSave(name, {
|
||||
@@ -38,7 +39,7 @@
|
||||
const parsed = path.parse(filePath);
|
||||
// if (!parsed.ext) filePath += `.${fileExtension}`;
|
||||
|
||||
await axiosInstance().post('files/save-as', { filePath, data, format });
|
||||
await apiCall('files/save-as', { filePath, data, format });
|
||||
closeCurrentModal();
|
||||
|
||||
if (onSave) {
|
||||
|
||||
Reference in New Issue
Block a user