mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 04:56:00 +00:00
fixes
This commit is contained in:
@@ -136,7 +136,7 @@ module.exports = {
|
||||
if (handleProcessCommunication(message, subprocess)) return;
|
||||
this[`handle_${msgtype}`](runid, message);
|
||||
});
|
||||
return newOpened;
|
||||
return _.pick(newOpened, ['runid']);
|
||||
},
|
||||
|
||||
start_meta: true,
|
||||
|
||||
@@ -86,7 +86,7 @@ module.exports = {
|
||||
this[`handle_${msgtype}`](sesid, message);
|
||||
});
|
||||
subprocess.send({ msgtype: 'connect', ...connection, database });
|
||||
return newOpened;
|
||||
return _.pick(newOpened, ['conid', 'database', 'sesid']);
|
||||
},
|
||||
|
||||
executeQuery_meta: true,
|
||||
|
||||
@@ -31,6 +31,7 @@ module.exports = function useController(app, electron, route, controller) {
|
||||
// console.log('REGISTERING HANDLER', handler);
|
||||
electron.ipcMain.handle(handler, async (event, args) => {
|
||||
const data = await controller[key](args);
|
||||
// console.log('HANDLED API', handler, data);
|
||||
return data;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
$: $effect;
|
||||
|
||||
const handleRunnerDone = async () => {
|
||||
const resp = await apiCall(`runners/files?runid=${runnerId}`);
|
||||
const resp = await apiCall('runners/files', { runid: runnerId });
|
||||
files = resp;
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -17,6 +17,7 @@ function wantEventSource() {
|
||||
export async function apiCall(route: string, args: {} = undefined) {
|
||||
const electron = getElectron();
|
||||
if (electron) {
|
||||
// console.log('CALLING API', route.replace('/', '-'), JSON.stringify(args == null ? null : args));
|
||||
const resp = await electron.invoke(route.replace('/', '-'), args);
|
||||
return resp;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user