Standard Responses to Globals

This commit is contained in:
Luis Fernando Molina committed 2020-11-27 13:17:12 +01:00
1 parent 2ded6a45b1
commit da5e50bf85
36 files changed
+549 -542

No files matched your search

@@ -165,7 +165,7 @@ exports.newTradingOutput = function newTradingOutput(bot, logger, tradingEngineM
outputDatasetsMap.set(productName, [])
return
}
if (response.err.result !== global.DEFAULT_OK_RESPONSE.result) {
if (response.err.result !== TS.projects.superalgos.globals.standardResponses.DEFAULT_OK_RESPONSE.result) {
throw(response.err)
}
outputDatasetsMap.set(productName, JSON.parse(response.text))
@@ -219,14 +219,14 @@ exports.newTradingOutput = function newTradingOutput(bot, logger, tradingEngineM
let response = await fileStorage.asyncCreateTextFile(filePath, fileContent)
if (response.err.result !== global.DEFAULT_OK_RESPONSE.result) {
if (response.err.result !== TS.projects.superalgos.globals.standardResponses.DEFAULT_OK_RESPONSE.result) {
throw(response.err)
}
}
} catch (err) {
logger.write(MODULE_NAME, '[ERROR] start -> err = ' + err.stack)
throw(global.DEFAULT_FAIL_RESPONSE)
throw(TS.projects.superalgos.globals.standardResponses.DEFAULT_FAIL_RESPONSE)
}
}
}