events work in electron IPC

This commit is contained in:
Jan Prochazka
2021-12-25 10:52:48 +01:00
parent 6dcbb5e308
commit 185cfab5d8
13 changed files with 68 additions and 40 deletions

View File

@@ -28,7 +28,7 @@ module.exports = function useController(app, electron, route, controller) {
if (electron) {
if (meta === true) {
const handler = `${route.substring(1)}-${_.kebabCase(key)}`;
console.log('REGISTERING HANDLER', handler);
// console.log('REGISTERING HANDLER', handler);
electron.ipcMain.handle(handler, async (event, args) => {
const data = await controller[key](args);
return data;