Partial export processing

This commit is contained in:
2020-06-17 19:50:01 -05:00
parent bb537d1d20
commit 117aefcf05
4 changed files with 163 additions and 46 deletions

View File

@@ -2,16 +2,16 @@ const Constants = require('../../constants');
const helpers = require('../../helpers');
const addListeners = (ipcMain, {standardIPCReply}) => {
ipcMain.on(Constants.IPC_Import_Skylinks, (event, data) => {
ipcMain.on(Constants.IPC_Export_Skylinks, (event, data) => {
helpers
.importSkylinks(data.Version, data.JsonArray)
.exportSkylinks(data.Version, data.Paths)
.then(result => {
standardIPCReply(event, Constants.IPC_Import_Skylinks_Reply, {
standardIPCReply(event, Constants.IPC_Export_Skylinks_Reply, {
Result: result,
});
})
.catch(error => {
standardIPCReply(event, Constants.IPC_Import_Skylinks_Reply, {}, error);
standardIPCReply(event, Constants.IPC_Export_Skylinks_Reply, {}, error);
});
});
@@ -27,6 +27,19 @@ const addListeners = (ipcMain, {standardIPCReply}) => {
standardIPCReply(event, Constants.IPC_Grab_Skynet_Tree_Reply, {}, error);
});
});
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 = {