Refactoring
This commit is contained in:
@@ -2,7 +2,7 @@ const Constants = require('../../constants');
|
||||
const helpers = require('../../helpers');
|
||||
const path = require('path');
|
||||
|
||||
const addListeners = (ipcMain, standardIPCReply) => {
|
||||
const addListeners = (ipcMain, {standardIPCReply}) => {
|
||||
ipcMain.on(Constants.IPC_Download_File, (event, data) => {
|
||||
const destination = path.join(helpers.getDataDirectory(), data.Filename);
|
||||
helpers.downloadFile(data.URL, destination, (progress) => {
|
||||
@@ -22,4 +22,4 @@ const addListeners = (ipcMain, standardIPCReply) => {
|
||||
|
||||
module.exports = {
|
||||
addListeners
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user