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

@@ -42,6 +42,7 @@
import axiosInstance from '../utility/axiosInstance';
import { findCommand } from '../commands/runCommand';
import { useConnectionColor } from '../utility/useConnectionColor';
import { apiCall } from '../utility/api';
$: databaseName = $currentDatabase && $currentDatabase.name;
$: connection = $currentDatabase && $currentDatabase.connection;
@@ -64,7 +65,7 @@
async function handleSyncModel() {
if (connection && databaseName) {
await axiosInstance().post('database-connections/sync-model', { conid: connection._id, database: databaseName });
await apiCall('database-connections/sync-model', { conid: connection._id, database: databaseName });
}
}
</script>