Removing logger logs for now

This commit is contained in:
Matias committed 2019-02-15 10:37:59 -03:00
1 parent 49602bf12f
commit 8bfe11a902
2 files changed
+3 -12

No files matched your search

+3 -8
View File
@@ -1,13 +1,10 @@
const axios = require('axios')
const appRoot = require('app-root-path')
const { logger } = require(`${appRoot}/utils/logger`)
const auth = require(`${appRoot}/utils/auth`)
exports.updateExecutionResults = async function (summaryDate, buyAverage, sellAverage,
marketRate, combinedProfitsA, combinedProfitsB) {
logger.debug('updateExecutionResults -> Entering Function.')
try {
const accessToken = await auth.authenticate()
@@ -50,12 +47,10 @@ exports.updateExecutionResults = async function (summaryDate, buyAverage, sellAv
}
})
if (!operationsResponse.data.errors)
logger.debug('updateExecutionResults -> Operations Module Response: %s', operationsResponse.data.data.operations_UpdateExecutionSummary)
else throw new Error(operationsResponse.data.errors[0].message)
if (operationsResponse.data.errors)
throw new Error(operationsResponse.data.errors[0].message)
} catch (error) {
logger.error('updateExecutionResults -> Error: ' + error.stack)
throw new Error('There has been an error updating the execution report: ' + error)
throw new Error('There has been an error updating the execution on the clone: ' + error)
}
}