Partial import processing

This commit is contained in:
2020-06-15 16:03:01 -05:00
parent f29ecf5d5d
commit 5e6431d630
8 changed files with 104 additions and 11 deletions

View File

@@ -0,0 +1,21 @@
const Constants = require('../../constants');
const helpers = require('../../helpers');
const addListeners = (ipcMain, {standardIPCReply}) => {
ipcMain.on(Constants.IPC_Import_Skylinks, (event, data) => {
helpers
.importSkylinks(data.Version, data.JsonArray)
.then(result => {
standardIPCReply(event, Constants.IPC_Import_Skylinks_Reply, {
Result: result,
});
})
.catch(error => {
standardIPCReply(event, Constants.IPC_Import_Skylinks_Reply, {}, error);
});
});
};
module.exports = {
addListeners
};