simplify use of callback

This commit is contained in:
Iuri Matias 2018-07-08 20:43:41 +03:00
parent df97a6ac00
commit 46a6d391cd
2 changed files with 2 additions and 12 deletions

View File

@ -136,12 +136,7 @@ class IPFS {
blockchainConfig: self.blockchainConfig blockchainConfig: self.blockchainConfig
}); });
self.logger.trace(`Storage module: Launching ipfs process...`); self.logger.trace(`Storage module: Launching ipfs process...`);
return storageProcessesLauncher.launchProcess('ipfs', (err) => { return storageProcessesLauncher.launchProcess('ipfs', callback);
if (err) {
return callback(err);
}
callback();
});
} }
registerUploadCommand() { registerUploadCommand() {

View File

@ -105,12 +105,7 @@ class Swarm {
blockchainConfig: self.blockchainConfig blockchainConfig: self.blockchainConfig
}); });
self.logger.trace(`Storage module: Launching swarm process...`); self.logger.trace(`Storage module: Launching swarm process...`);
return storageProcessesLauncher.launchProcess('swarm', (err) => { return storageProcessesLauncher.launchProcess('swarm', callback);
if (err) {
return callback(err);
}
callback();
});
} }
registerUploadCommand(cb) { registerUploadCommand(cb) {