excel import fix

This commit is contained in:
Jan Prochazka
2023-02-17 13:57:30 +01:00
parent c7aaf06506
commit 36c792f44e
3 changed files with 4 additions and 15 deletions

View File

@@ -1,9 +1,3 @@
let dbgateEnv;
function initialize(dbgateEnv) {
dbgateEnv = dbgateEnv;
}
const fileFormat = {
packageName: 'dbgate-plugin-excel',
// file format identifier
@@ -17,8 +11,8 @@ const fileFormat = {
// function name from backend, which contains writer factory, postfixed by package name
writerFunc: 'writer@dbgate-plugin-excel',
addFileToSourceList: async ({ fileName }, newSources, newValues) => {
const resp = await dbgateEnv.apiCall('plugins/command', {
addFileToSourceList: async ({ fileName }, newSources, newValues, apiCall) => {
const resp = await apiCall('plugins/command', {
command: 'analyse',
packageName: 'dbgate-plugin-excel',
args: {
@@ -85,5 +79,4 @@ export default {
}),
},
],
initialize,
};